#include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} void solve(){ ll a,b,c; cin>>a>>b>>c; ll ans=0; if(a>=c){ ans+=2*c; a-=c; c=0; }else{ ans+=2*a; c-=a; a=0; } ans+=c/2; if(a>=b){ ans+=b; a-=b; b=0; }else{ ans+=a; b-=a; a=0; } ans+=2*(b/2); cout<>t; while(t--)solve(); }