#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a;
  std::vector<long long int> out;
  int x;
  cin >> x;
  while (x--) {
    cin >> a;
    if (a % 2 == 0) {
      a = a / 2;
    } else {
      a = a / 2 + 1;
    }
    out.push_back(a);
  }
  for (int i = 0; i < out.size(); i++) {
    cout << out[i] << endl;
    ;
  }
}
