#include int main() { int c[3] = {256}; char in[32]; for(int i = 0; i < 3; i++) { std::cin >> in; if(in[0] == 'N') continue; int count = 1; for(int j = 1;; j += 2) { if(in[j] == 0) break; count++; } c[i] = 16 - count; c[i] = c[i] * c[i]; } int ans = 1; for(int i = 0; i < 3; i++) { if(c[i]) ans *= c[i]; } std::cout << ans << std::endl; return 0; }