#include <bits/stdc++.h>
int main(int argc, char **argv) {
  int a, x;
  scanf("%d", &a);
  for (int i = 0; i < a; i++) {
    scanf("%d", &x);
    printf("%d\n", (x % 7) ? (x / 7 + 1) : (x / 7));
  }
  return 0;
}
