n=int(input()) print("-11"[n!=1and n!=4and n%4!=2::2])