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