import sys import math import collections import bisect import itertools import decimal # import numpy as np # sys.setrecursionlimit(10 ** 6) INF = 10 ** 20 MOD = 10 ** 9 + 7 # MOD = 998244353 ni = lambda: int(sys.stdin.readline().rstrip()) ns = lambda: map(int, sys.stdin.readline().rstrip().split()) na = lambda: list(map(int, sys.stdin.readline().rstrip().split())) na1 = lambda: list(map(lambda x: int(x) - 1, sys.stdin.readline().rstrip().split())) # ===CODE=== def main(): n = ni() d = [1, 4] flg = n % 4 == 0 or n % 2 or n in d print(1 if flg else -1) if __name__ == '__main__': main()