#include <bits/stdc++.h>
using namespace std;
int main() {
  int loop;
  cin >> loop;
  for (int j = 0; j < loop; j++) {
    int a, b, c;
    cin >> a;
    if (a <= 2)
      cout << 1 << endl;
    else {
      if (a % 2 == 0) {
        a -= 2;
        b = a / 2;
      } else {
        a--;
        b = a / 2;
      }
      cout << b + 1 << endl;
    }
  }
}
