/* * =template=.cpp * Copyright (C) 2017 hzw * * Distributed under terms of the MIT license. */ #include #include #include #include #include #include #include #include #include #include #include #include #define FR first #define SC second #define MP make_pair #define rep(i,a,b) for (int i=a;i<=b;i++) #define pb push_back #define ws wss #define left lll #define right rrr using namespace std; typedef long long LL; typedef pair PII; template void upmax(T &a,T b) { if (a void upmin(T &a,T b) { if (a>b) a=b;} void read(int &x) { char ch;int fu=1; while ((ch=getchar())<=32); x=0; if (ch=='-') fu=-1;else x=ch-48; while ((ch=getchar())>32) x=x*10+ch-48; x*=fu; } void read(unsigned long long &x) { char ch;int fu=1; while ((ch=getchar())<=32); x=0; if (ch=='-') fu=-1;else x=ch-48; while ((ch=getchar())>32) x=x*10+ch-48; x*=fu; } const double pi=acos(-1); void upmax(int &a,int b) { if (ab) a=b;} //----------------------- int exp(int a,int b,int c) { int d=1; while (b) { if (b&1) d=1LL*d*a%c; b>>=1;a=1LL*a*a%c; } return d; } int gcd(int a,int b) { return b>0?gcd(b,a%b):a;} const int N=110000,p=1000000007; int cas; LL calc(LL n) { LL k=n%6,l=n/6; if (k==0) return n/2; if (k==2) return n/2; if (k==4) return n-1; if (k==1) return n-2*l; if (k==3) return l; if (k==5) return l; return 233; } int main() { scanf("%d",&cas); while (cas--) { LL n; cin>>n; cout<