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