#include <bits/stdc++.h>
using namespace std;
int main() {
  long long test;
  cin >> test;
  for (int loop = 0; loop < test; loop++) {
    long long num;
    cin >> num;
    long long val = num / 7 + 1;
    if (num % 7 == 0) val--;
    cout << val << "\n";
  }
}
