#include #include #include using namespace std; int main(){ string R; cin >> R; string G; cin >> G; string B; cin >> B; vector S = {R, G, B}; int ans = 1; for (int i = 0; i < 3; i++){ if (S[i] == "NONE"){ ans *= 256; } else { int tmp = 16 - (S[i].size() + 1) / 2; ans *= tmp * tmp; } } cout << ans << endl; }