#include using namespace std; using i8 = int8_t;using i16 = int16_t;using i32 = int32_t;using i64 = int64_t;using i128 = __int128_t;using u8 = uint8_t;using u16 = uint16_t;using u32 = uint32_t;using u64 = uint64_t;using u128 = __uint128_t;using f32 = float;using f64 = double;using f80 = long double; using vi32 = vector;using vi64 = vector;using vu32 = vector;using vu64 = vector; using vvi32 = vector>;using vvi64 = vector>;using vvu32 = vector>;using vvu64 = vector>; using pi32 = pair;using pi64 = pair;using pu32 = pair;using pu64 = pair; using vpi32 = vector;using vpi64 = vector;using vpu32 = vector;using vpu64 = vector; const i64 Mod = 1e9+7; int main() { string s; i64 ans = 1; for (int i = 0; i < 3; i++) { cin >> s; i64 tmp = 16; if (s != "NONE") { for (int j = 0; j < s.size(); j += 2) tmp--; } ans *= tmp * tmp; } cout << ans << '\n'; return 0; }