#include <bits/stdc++.h>

using namespace std;

int main() {
    int T, n;
    scanf("%d", &T);
    while (T--) {
        scanf("%d", &n);
        printf("%d\n", (n - 1) / 2 + 2);
    }
    /*
    int n;
    set<int> S;
    for (n = 1; n < 100; n++) {
        S.clear();
        for (int i = 1; i <= n + 1; i++)
            S.insert(n % i);
        cout << (n - 1) / 2 + 2 << "  " << S.size() << endl;
        for (auto x:S)
            cout << x << " ";
        cout << endl;
    }*/
    return 0;
}