#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int counter = 0;
    int x;
    cin >> x;
    while (x != 0) {
      counter++;
      if (x <= 7) {
        x = 0;
        break;
      }
      x -= 7;
    }
    cout << counter << endl;
  }
  return 0;
}
