l = list(map(str, input().split())) for i in range(len(l)): if l[i]=="?": if i!=1: if i=="2": print("4") else: print("1") else: print("14")