#include <bits/stdc++.h>
using namespace std;
int main() {
  int num;
  cin >> num;
  for (int i = 0; i < num; i++) {
    int curr;
    cin >> curr;
    int ctr = 0;
    if (curr % 7 != 0) {
      ctr++;
    }
    if (curr / 7 != 0) {
      ctr += curr / 7;
    }
    cout << ctr << endl;
  }
  return 0;
}
