lst = [int(i) for i in input().strip().split(' ')] lst2 = [(lst[0] + i) % 12 for i in range(0, 12, 4)] for i in lst2: if i not in lst: print(i)