#include #define rep(i,a,b) for(int i=int(a);i> R >> G >> B; int num[3] = {}; if(R != "NONE")num[0] = (R.size() + 1) / 2; if(G != "NONE")num[1] = (G.size() + 1) / 2; if(B != "NONE")num[2] = (B.size() + 1) / 2; int ans = 1; rep(i,0,3)ans *= (16 - num[i]) * (16 - num[i]); cout << ans << endl; }