#include <bits/stdc++.h>
const int maxn = 1010;
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = n / 7;
    cout << ans + 1 << endl;
  }
  return 0;
}
