#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 0; i < n; i++) {
    int b = a[i] / 7;
    if (a[i] <= 7 || a[i] <= 2) {
      printf("1\n");
    } else {
      b++;
      printf("%d\n", b);
    }
  }
  return 0;
}
