fun main() { val str = readLine()!! val n = str.takeLast(2).toInt() println(if (str == "1" || n % 4 == 2) -1 else 1) }