#include<iostream>
using namespace std;
int main()
{
int x;
cin >> x;
bool xz1=false;
bool xz2=false;
if (x % 2 == 0)xz1 = true;
if (x > 4 && x <= 12)xz2 = false;
if (xz1 && xz2)cout << "1";
else cout<<"0";
if (xz1 || xz2)cout << "1";
else cout<<"0";
if (!xz1 && xz2 )cout << "1";
else if (!xz2 && xz1 )cout << "1";
else cout << "0";
if (!xz1 && !xz2 )cout << 1;
else cout<<"0";
return 0;
}