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