#include <bits/stdc++.h>
using namespace std;
int time_rolls[500005];
void prepare() {
  for (int i = 1; i <= 100; i++) time_rolls[i] = (int)1e9;
  for (int i = 1; i <= 100; i++) {
    for (int j = 2; j <= 7; j++)
      if (i >= j) time_rolls[i] = min(time_rolls[i], time_rolls[i - j] + 1);
  }
}
void solve() {
  int spot;
  scanf("%d", &spot);
  printf("%d\n", time_rolls[spot]);
}
int main() {
  prepare();
  int tester;
  scanf("%d", &tester);
  while (tester--) solve();
}
