#include using namespace std; typedef long long ll; typedef pair pii; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);++i) int main(){ cin.tie(0); ios::sync_with_stdio(false); char c1,c2,c3;cin >> c1 >> c2 >> c3; if(c1=='?' || c3=='?'){ if(c2=='2') cout << 4 << endl; else cout << 1 << endl; } else cout << 14 << endl; }