#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef vector vi; typedef vector vll; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define p(x) cout << x << endl; #define MOD 1000000007 #define PI 3.14159265359 int main() { cin.tie(0); ios::sync_with_stdio(false); int mr = 0, mg = 0, mb = 0; string r, g, b; cin >> r >> g >> b; if(r != "NONE"){ mr = 16 - (r.size() - (r.size() / 2)); }else{ mr = 16; } if(g != "NONE"){ mg = 16 - (g.size() - (g.size() / 2)); }else{ mg = 16; } if(b != "NONE"){ mb = 16 - (b.size() - (b.size() / 2)); }else{ mb = 16; } int maxColor = mr * mr * mg * mg * mb * mb; p(maxColor); }