#include <bits/stdc++.h>
template <class t>
void maxi(t &x, t y) {
  if (x < y) x = y;
}
template <class t>
void mini(t &x, t y) {
  if (x > y) x = y;
}
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int t;
  cin >> (t);
  ;
  while (t--) {
    int x;
    cin >> (x);
    ;
    cout << (x / 7 + (x % 7 > 0)) << endl;
  }
  return 0;
}
