#include <bits/stdc++.h>
using namespace std;
void input(vector<long long>& v, long long n) {
  for (long long i = 0; i < (long long)(n); i++) {
    long long in;
    cin >> in;
    v.push_back(in);
  }
}
void output(vector<long long> v) {
  for (long long i = 0; i < (long long)(v.size()); i++) cout << v[i] << " ";
}
int solve() {
  long long n;
  cin >> n;
  long long c = n / 7;
  if (n % 7 == 0) {
    cout << c << endl;
  } else {
    cout << c + 1 << endl;
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) solve();
  return 0;
}
