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