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