P13277 [CodeChef] cm1404
NOI
题目描述

Problem description.
Liza wants to share her pizza among n friends, What are the minimum number of straight knife strokes required to cut the pizza into n pieces?

Input
The first line contains number of test cases T.
The next T lines contain the input numbers N, the numbers of pieces required.

Output
For each test case, output in a new line, the minimum number of straight knife strokes(integer), required for the test case.

Constraints

1 ≤ t ≤ 1000
1 ≤ n ≤ 1000

Example
Input:
3
4
5
6
Output:
2
3
3

输入格式

见题面

输出格式

见题面

样例输入
3 4 5 6
样例输出
2 3 3