import numpy as np a = input() a = a.split(" ") a = np.array(a) question = np.where(a=="?")[0] two = np.where(a=="2")[0] three = np.where(a=="3")[0] if(question==1): print(14) if(two==1): print(4) if(three==1): print(1)