#include #include #include using namespace std; int main() { string rgb[3]; string code = "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F"; int ans = 1; for (int i = 0; i < 3; i++) { cin >> rgb[i]; if (rgb[i] == "NONE") { ans *= pow(16, 2); } else { ans *= pow((code.length() - rgb[i].length()) / 2, 2); } } cout << ans; }