c1, c2, c3 = input().split() if c2 == '2': print('4') elif c2 == '3': print('1') else: print('14')