import java.math.BigInteger; import java.util.*; public class A_ { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger N = sc.nextBigInteger(); if (N.equals(BigInteger.valueOf(1)) || N.equals(BigInteger.valueOf(4)) || N.remainder(BigInteger.valueOf(4)).equals(BigInteger.TWO)) { System.out.println(-1); } else { System.out.println(1); } } }