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