#include <bits/stdc++.h>
using namespace std;
void solve(int tc) {
  long long int n;
  scanf("%lld", &n);
  printf("%lld", ((n) % (7LL) == 0 ? (n) / (7LL) : ((n) / (7LL)) + 1));
  printf("\n");
}
int main() {
  int tc;
  scanf("%d", &tc);
  for (__typeof(tc + 1) t = (1) - ((1) > (tc + 1));
       t != (tc + 1) - ((1) > (tc + 1)); t += 1 - 2 * ((1) > (tc + 1)))
    solve(t);
  return 0;
}
