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