//12252024832524 #include #include #define Min(x,y) (xy?x:y) using namespace std; typedef long long LL; LL n; LL Read() { LL x1 = 0,f1 = 1;char c1 = getchar(); while(c1 > '9' || c1 < '0'){if(c1 == '-')f1 = -1;c1 = getchar();} while(c1 >= '0' && c1 <= '9'){x1 = (x1*10) + (c1^48);c1 = getchar();} return x1 * f1; } LL work() { n = Read(); if(n == 1 || n == 2) return 1; else { if(n % 2 == 0) { if(n % 3 == 1) return n - 1; else return (n >> 1); } else { if(n % 3 == 1) return (n / 6) * 4 + 1; else return n / 3 / 2; } } } int main() { for(int T = Read(); T ;-- T)printf("%lld\n",work()); return 0; }