N=gets.to_i if N.odd?&&N>1||N%4==0&&N>4 puts 1 else puts -1 end