#include<bits/stdc++.h>
using namespace std;
signed main()
{
int x,a,b,c,d;
cin >> x;
if (x%2==0)
{
a=0;
b=1;
c=1;
d=0;
cout << a << b << c << d << endl;
}
else if (x<=12&&x>=4)
{
a=0;
b=1;
c=1;
d=0;
cout << a << b << c << d << endl;
}
else if (x%2==0&&x<=12&&x>=4)
{
a=1;
b=1;
c=0;
d=0;
cout << a << b << c << d << endl;
}
return 0;
}