#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << "1\n";
  } else if (n == 2 || n == 3) {
    cout << 2 << "\n";
  } else {
    if (n % 2 != 0) {
      int a = 1;
      cout << (n + 1) / 2 << "\n";
    } else {
      cout << n / 2 + 1 << "\n";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n = 1;
  cin >> n;
  for (int i = 0; i < n; i++) {
    solve();
  }
}
