#include using namespace std; int main(){ char s1,s2,s3; cin >> s1 >> s2 >> s3; if(s2 == '?') cout << "14" << endl; else if(s2 == '2') cout << "4" << endl; else if(s2 == '3') cout << "1" << endl; }