#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n % 7)
      cout << (n / 7) + 1 << "\n";
    else
      cout << n / 7 << "\n";
  }
  return 0;
}
