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