规律题
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
ios::sync_with_stdio(0), cin.tie(0);
int t;
cin >> t;
while(t--) {
long long n, s = 0;
cin >> n;
s += n;
if (n % 3 == 0) s += n;
cout << s << "\n";
}
return 0;
}