#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int C[7] = {2, 3, 4, 5, 6, 7};
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int ans = n / 5;
    n = n % 5;
    if (n) ans++;
    cout << ans << endl;
  }
}
