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