Codeforces Round 662 (Div. 2)
A
Rainbow Dash, Fluttershy and Chess Coloring
Codeforces
800
原题
←B →
翻译中…

One evening Rainbow Dash and Fluttershy have come up with a game. Since the ponies are friends, they have decided not to compete in the game but to pursue a common goal.

翻译中…

The game starts on a square flat grid, which initially has the outline borders built up. Rainbow Dash and Fluttershy have flat square blocks with size $1\times1$, Rainbow Dash has an infinite amount of light blue blocks, Fluttershy has an infinite amount of yellow blocks.

翻译中…

The blocks are placed according to the following rule: each newly placed block must touch the built on the previous turns figure by a side (note that the outline borders of the grid are built initially). At each turn, one pony can place any number of blocks of her color according to the game rules.

翻译中…

Rainbow and Fluttershy have found out that they can build patterns on the grid of the game that way. They have decided to start with something simple, so they made up their mind to place the blocks to form a chess coloring. Rainbow Dash is well-known for her speed, so she is interested in the minimum number of turns she and Fluttershy need to do to get a chess coloring, covering the whole grid with blocks. Please help her find that number!

翻译中…

Since the ponies can play many times on different boards, Rainbow Dash asks you to find the minimum numbers of turns for several grids of the games.

翻译中…

The chess coloring in two colors is the one in which each square is neighbor by side only with squares of different colors.

翻译中…

Input

翻译中…

The first line contains a single integer $T$ ($1 \le T \le 100$): the number of grids of the games.

翻译中…

Each of the next $T$ lines contains a single integer $n$ ($1 \le n \le 10^9$): the size of the side of the grid of the game.

翻译中…

Output

翻译中…

For each grid of the game print the minimum number of turns required to build a chess coloring pattern out of blocks on it.

翻译中…

Note

翻译中…

For $3\times3$ grid ponies can make two following moves: image

翻译中…

样例

Input #1
2
3
4
Output #1
2
3
InputCopy OutputCopy
题目信息
题号
1393A
时间限制
1 s
内存限制
256 MB
标签
贪心
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。