import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); BigInteger n = sc.nextBigInteger(); sc.close(); BigInteger b0 = BigInteger.ZERO; BigInteger b1 = BigInteger.ONE; BigInteger b2 = BigInteger.valueOf(2); BigInteger b3 = BigInteger.valueOf(3); BigInteger b4 = BigInteger.valueOf(4); BigInteger b8 = BigInteger.valueOf(8); if (n.remainder(b2).compareTo(b1) == 0) { if (n.compareTo(b3) >= 0) { System.out.println(1); } else { System.out.println(-1); } } else { if (n.remainder(b4).compareTo(b0) == 0 && n.compareTo(b8) >= 0) { System.out.println(1); } else { System.out.println(-1); } } } }