n=gets.to_i if n==4||n==1 puts -1 elsif n%2==1||n%4==0 puts 1 else puts -1 end