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