#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
void solve() {
  long long n;
  cin >> n;
  long long ans;
  if (n % 2 == 1)
    ans = n / 2;
  else
    ans = n / 2 - 1;
  cout << ans + 1 << '\n';
}
int main() {
  fastio();
  int t = 1;
  cin >> t;
  while (t--) solve();
  return 0;
}
