#include #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) typedef long long ll; using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); char s[3]; rep(i,3){ cin >> s[i]; } if(s[0]=='?'){ if(s[1]=='2'){ cout << 4 << endl; }else{ cout << 1 << endl; } }else if(s[1]=='?'){ cout << 14 << endl; }else{ if(s[0]=='2'){ cout << 1 << endl; }else{ cout << 4 << endl; } } return 0; return 0; }