#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

void toBit(int n)
{
    vector<int> vec;
    while (n > 0)
    {
        if (n % 2 == 0)
        {
            vec.push_back(0);
        }
        else
        {
            vec.push_back(1);
        }
        n /= 2;
    }
    for (int i = vec.size() - 1; i >= 0; i--)
    {
        cout << vec[i];
    }
    cout << endl;

}

int main()
{
    int n;
    while (cin >> n)
    {
        toBit(n);
    }
}