#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    int n;
    cin >> n;
    int ans = 0;
    int k = 7;
    int x = n;
    int d = n;
    while (d > 0) {
      if (d >= k) {
        d = d - k;
        ans++;
      } else {
        k--;
      }
    }
    cout << ans << endl;
  }
  cout << "";
  return 0;
}
