#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long ans = 1, k = 0, l = 0, a, b, e, maxx = 0;
  cin >> b;
  for (int i = 0; i < b; i++) {
    cin >> a;
    cout << a / 2 + a % 2 << endl;
  }
}
