import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

void main() {
    auto Q = readln.chomp.to!int;

    while (Q--) {
        int N = readln.chomp.to!int;
        int L = 2;
        int U = 7;
        int i = 1;
        while (U < N) {
            L += 2;
            U += 7;
            i += 1;
        }
        writeln(i);
    }

}
