//There are many lamps in a line.一排灯
// All of them are off at first.未亮
// A series of operations are carried out on these lamps. 戏于灯
//On the i-th operation, the lamps whose numbers are the multiple of i change the condition //天赐轮回之上限
//灯于轮回次数之倍数处,易死生
//( on to off and off to on ).
不扯了。。。 要求输出第n盏灯的终态
//Input
//Each test case contains only a number n ( 0< n<= 10^5)*****#define Max 100000**** in a line.
//Output
//Output the condition of the n-th lamp after infinity operations ( 0 - off, 1 - on ).
#include<iostream>
using namespace std;
#define Max 100000//如果少了就错了
bool a[Max];
int main()
{
int n;
while(cin>>n)
{
for(int i=0;i<=n;i++)
a[i]=0;
for(int i=1;i<=n;i++)
{
for(int k=1;k*i<=n;k++)
{
a[k*i]=!a[k*i];
}
}
cout<<a[n]<<endl;
}
}
//致敬面向过程//There are many lamps in a line.一排灯 // All of them are off at first.未亮 // A series of operations are carried out on these lamps. 戏于灯 //On the i-th operation, the lamps whose numbers are t