#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n;
  while (n--) {
    cin >> m;
    if (m % 2 == 1)
      cout << (m + 1) / 2 << endl;
    else
      cout << 1 + m / 2 << endl;
  }
}
