print(1 if (n := int(input())) % 4 != 2 and n ^ 5 > 5 else -1)