#include <fstream>
#include <iostream>
using namespace std;
int main()
{
    __int64 n,a[100000];
    int d=0;
    ifstream f1("doinp.inp");
    ofstream f2("doinp.out");
    f1>>n;
    cin>>n;
    while (n > 0)
    {
        a[d] = n%2;
        d++;
        n /= 2;
    }
    for (int i = d-1; i > -1; i--)
    {
        cout<<a[i];
    }
    for (int i = d-1; i > -1; i--)
    {
        f2<<a[i];
    }
    return 0;
}
