#include #include #include using namespace std; int f(string &s) { if (s == "NONE") return 16; return 16 - (s.length() + 1) / 2; } int main() { string r, g, b; cin >> r >> g >> b; int ans = f(r) * f(g) * f(b); cout << ans * ans << endl; // <= 2^24 return 0; }