#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 2 || n == 3 || n == 4 || n == 5 || n == 6 || n == 7)
      cout << "1" << endl;
    else if (n % 7 == 1)
      cout << ((n - 1) / 7) + 1 << endl;
    else
      cout << (n / 7) + 1 << endl;
  }
}
