line=input() line=line.rstrip().split(" ") if line[1]=="?": print(14) else: if line[1]=="2": print(4) else: print(1)