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