c=input().split()[1] print(14if c=="?"else[1,4][c=="2"])