#include using namespace std; typedef long long LL; int main() { int T; for (cin >> T; T--; ) { LL n, n6, ans; cin >> n; n6 = (n / 6) * 6; switch (n - n6) { case 0: case 2: { ans = n / 2; break; } case 1: { ans = n / 2 + n6 / 6 + 1; break; } case 3: case 5: { ans = n6 / 6; break; } case 4: { ans = n - 1; break; } } cout << ans << '\n'; } return 0; }