a,b,c = input().split() if b == "?": print(14) else: if b == 3: print(1) else: print(4)