#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { char c1, c2, c3; cin >> c1 >> c2 >> c3; if (c1 == '?' or c3 == '?') { if (c2 == '3') { cout << 1 << endl; } else if (c2 == '2') { cout << 4 << endl; } } else { cout << "14" << endl; } return 0; }