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