| Codeforces Round 1061 (Div. 2) |
|---|
| Finished |
Hao and Alex are good friends. After winning a coding competition together, they received a huge pizza as their prize.
Initially, they are given $$$n$$$ slices of pizza. Each day, the following process takes place:
$$$$$$m_1 + m_2 + m_3 = m\text{ and } 1 \le m_1\le m_2\le m_3.$$$$$$
Then:
Your task is to determine the maximum total number of slices Hao can eat if he always chooses the partition optimally.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 500$$$). The description of the test cases follows.
The first and only line of each test case contains a single integer $$$n$$$ ($$$3 \le n \le 10^9$$$) — the initial number of pizza slices.
Note that there are no constraints on the sum of $$$n$$$ over all test cases.
For each test case, output a single integer representing the maximum total number of slices Hao can eat.
3843
311
In the first test case, Hao can eat $$$3$$$ slices as follows:
In the second test case, Hao can eat $$$1$$$ slice as follows:
| Name |
|---|


