#include #include int T; int A[1000]; long long n; int main(){ scanf("%d",&T); while (T--){ scanf("%I64d",&n); switch (n%6){ case 1: printf("%I64d\n",n/6*4+1); break; case 2: printf("%I64d\n",n/6*3+1); break; case 3: printf("%I64d\n",n/6); break; case 4: printf("%I64d\n",n/6*6+3); break; case 5: printf("%I64d\n",n/6); break; case 0: printf("%I64d\n",(n/6-1)*3+3); break; } } }