// #define _GLIBCXX_DEBUG #include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input char c1, c2, c3; cin >> c1 >> c2 >> c3; // Output if (c1 == '?' || c3 == '?') cout << (c2 == '2' ? 4 : 1) << endl; else cout << 14 << endl; }