#include using namespace std; int main() { vector CC = {16, 16, 16}; for (int i = 0; i < 3; i++) { string S; cin >> S; if (S != "NONE") { for (char C : S) { if (C != ',') CC.at(i)--; } } } cout << CC.at(0) * CC.at(0) * CC.at(1) * CC.at(1) * CC.at(2) * CC.at(2) << endl; }