#include using namespace std; int main() { string R, G, B; cin >> R >> G >> B; int r = R == "NONE"? 16: 16 - ceil((double)R.size() / 2); int g = G == "NONE"? 16: 16 - ceil((double)G.size() / 2); int b = B == "NONE"? 16: 16 - ceil((double)B.size() / 2); int ans = (r * r) * (g * g) * (b * b); printf("%d\n", ans); return 0; }