#include <algorithm>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
const int maxn = 40;
string conversion(int m, string a, int n){
    int l = a.length(), k;
    string b = "";
    for(int i = 0; i < l; ){
        k = 0;
        for(int j = i; j < l; j++){
            int t = (k * m + a[j] - '0') % n;
            a[j] = (k * m + a[j] - '0') / n + '0';
            k = t;
        }
        b += char(k + '0');
        while(a[i] == '0') i++;
    } 
    reverse(b.begin(), b.end());
    return b;
}
int main(){
    string a, b;
    while(cin >> a){
        b = conversion(10, a, 2);
        cout << b << endl;   
    }
    return 0;
}