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