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