# coding:utf-8 #JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 n = int(input()) ans = 1 for i in range(2,n+1): ans ^= i print(ans)