N = gets.to_i if N == 1 or N == 4 then puts -1 elsif N % 2 == 1 or N % 4 == 0 then puts 1 else puts -1 end