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