#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { array a = { 16, 16, 16 }; rep(i, 3) { string s; getline(cin, s); if (s == "NONE") continue; a[i] -= count(s.begin(), s.end(), ',') + 1; } Debug(a); cout << a[0] * a[0] * a[1] * a[1] * a[2] * a[2] << endl; return 0; }