CF1996A.Legs

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Legs

It's another beautiful day on Farmer John's farm.

After Farmer John arrived at his farm, he counted nn legs. It is known only chickens and cows live on the farm, and a chicken has 22 legs while a cow has 44.

What is the minimum number of animals Farmer John can have on his farm assuming he counted the legs of all animals?

Input

The first line contains single integer tt (1t1031 \leq t \leq 10^3) — the number of test cases.

Each test case contains an integer nn (2n21032 \leq n \leq 2 \cdot 10^3, nn is even).

Output

For each test case, output an integer, the minimum number of animals Farmer John can have on his farm.

Samples

3
2
6
8
1
2
2

在线编程 IDE

建议全屏模式获得最佳体验