11776 - Final Exam - Problem B   

Description

Problem B - Christmas

Last Christmas, Roy Feng found out that he didn’t need to complete any assignment. He wanted to give some special one his heart, but nobody wanted to invite him to join a Christmas party. Without any choice, he decided to go to the movies by himself.

When he was buying the ticket, he noticed that there was a row of seats remained unsold. In order to take revenge on those lovey-dovey couples, he decided to buy some of the seats of that empty row which satisfying the following strategy. First, he didn’t want anybody to sit beside him. Second, he didn’t want to leave any two adjacent seats so that those couples could sit together.

Given the number of seats in that row, your task is to help Roy to compute the minimum number of seats he needs to buy.

By the way, if you are also alone last Christmas, maybe you can invite Roy to go to the movies next time!

Input

The input consists of multiple test cases. The first line of the input contains one integer T, which is the number of the test cases (1 ≤ T ≤ 100). Each of the following n lines contains a test case formatted as follows.

n

n (1≤ n ≤ 100) is the number of empty seats in the row.

Output

For each test case, print the minimum number of the seats Roy needs to buy to satisfy the above conditions.

Sample Input  Download

Sample Output  Download

Tags




Discuss