#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    cout << x / 2 << endl;
  }
  for (int i = 1; i <= 100; i++) cout << '\n';
  return 0;
}
