#include <bits/stdc++.h>
using namespace std;
inline int readint() {
  int rt = 0, sign = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') sign = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    rt = (rt << 3) + (rt << 1) + (ch & 15);
    ch = getchar();
  }
  return rt * sign;
}
int main() {
  int t;
  t = readint();
  for (; t--;) {
    int x = readint();
    printf("%d\n", x / 7 + (x % 7 > 0));
  }
  return 0;
}
