#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sticks;
  cin >> n;
  while (n--) {
    cin >> sticks;
    if (sticks % 2 == 0)
      cout << (sticks / 2) << endl;
    else
      cout << (1 + (sticks - 1) / 2) << endl;
  }
}
