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