#include <iostream>
using namespace std;
struct bigInterger {
    int digits[30];
    int length;
    bigInterger();
    bigInterger(string s);
    bigInterger divide(int b);
    void calculateSize();
};
void bigInterger:: calculateSize() {
    for (int i = length - 1; i >= 0; i--) {
        if (digits[i] == 0) {
            length--;
        } else break;
    }
}
bigInterger::bigInterger() {
    for (int i = 0; i < 30; i++) {
        digits[i] = 0;
    }
    length = 30;
}
bigInterger::bigInterger(string s) {
    for (int i = 0; i < 30; i++) {
        digits[i] = s[s.size() - 1 - i]-'0';
    }
    length = s.size();
}
bigInterger bigInterger::divide(int b) {
    bigInterger ans;
    int remainer = 0;
    for (int i = length - 1; i >= 0; i--) {
        int temp = remainer * 10 + digits[i];
        ans.digits[i] = temp / b;
        remainer = temp % b;
    }
    ans.calculateSize();
    return ans;
}
int main() {
    string a;
    while (cin >> a ) { // 注意 while 处理多个 case
        // cout << a + b << endl;
        string ans;
        bigInterger A = bigInterger(a);
        if (a == "0") ans = "0";
        else {
            while (A.length != 0) {
                ans = to_string(A.digits[0] % 2) + ans;
                A = A.divide(2) ;
            }
        }


        cout << ans << endl;
    }
}
// 64 位输出请用 printf("%lld")