## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

# [Solution] Working Week Codeforces Solution

A. Working Week
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Your working week consists of $n$ days numbered from $1$ to $n$, after day $n$ goes day $1$ again. And $3$ of them are days off. One of the days off is the last day, day $n$. You have to decide when the other two are.

Choosing days off, you pursue two goals:

• No two days should go one after the other. Note that you can't make day $1$ a day off because it follows day $n$.
• Working segments framed by days off should be as dissimilar as possible in duration. More specifically, if the segments are of size ${l}_{1}$${l}_{2}$, and ${l}_{3}$ days long, you want to maximize $min\left(|{l}_{1}-{l}_{2}|,|{l}_{2}-{l}_{3}|,|{l}_{3}-{l}_{1}|\right)$.

Output the maximum value of $min\left(|{l}_{1}-{l}_{2}|,|{l}_{2}-{l}_{3}|,|{l}_{3}-{l}_{1}|\right)$ that can be obtained.

Input

The first line of the input contains a single integer $t$ ($1\le t\le 1000$) — the number of test cases. The description of test cases follows.

The only line of each test case contains the integer $n$ ($6\le n\le {10}^{9}$).

Output

Output one integer — the minimum possible obtained value.

Note

In the image below you can see the example solutions for the first two test cases. Chosen days off are shown in purple. Working segments are underlined in green.

In test case $1$, the only options for days off are days $2$$3$, and $4$ (because $1$ and $5$ are next to day $n$). So the only way to place them without selecting neighboring days is to choose days $2$ and $4$.