#include <bits/stdc++.h>
using namespace std;
int Powerm(int a, int b, int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  int t = Powerm(a, b / 2, m);
  t = (t * t) % m;
  if (b & 1) t = (t * a) % m;
  return t;
}
int Power(int a, int b) {
  if (b == 0) return 1;
  if (b == 1) return a;
  int t = Power(a, b / 2);
  t = (t * t);
  if (b & 1) t = (t * a);
  return t;
}
int Gcd(int a, int b) {
  if (b == 0) {
    return a;
  } else {
    return Gcd(b, a % b);
  }
}
int LeftMostSetBit(int n) {
  if (n == 0) {
    return 0;
  }
  int msb = 0;
  while (n != 0) {
    n = n / 2;
    msb++;
  }
  return msb;
}
int RightMostSetBit(int n) { return __builtin_ffsl(n); }
int LLsqrt(int x) {
  if (x == 0 || x == 1) return x;
  int start = 1, end = x / 2, ans;
  while (start <= end) {
    int mid = (start + end) / 2;
    if (mid * mid == x)
      return mid;
    else if (mid <= x / mid)
      ans = mid, start = mid + 1;
    else
      end = mid - 1;
  }
  return ans;
}
void input() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n % 2 == 0) {
      cout << n / 2 << endl;
    } else {
      cout << (n / 2) + 1 << endl;
    }
  }
}
