#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <map>
using namespace std;
string divide(string str, int x) { //字符串除法
int remainder = 0; //余数
for (int i = 0; i < str.size(); i++) {
//当前的除数 = 上一轮的余数 * 10 + 当前第i位的数
int current = remainder * 10 + str[i] - '0';
str[i] = current / x + '0'; //结果的第i位
remainder = current % x; //保留这一轮的余数
}
int pos = 0;
while (str[pos] == '0') { //找首个非0下标
pos++;
}
return str.substr(pos); //删除前置多余的0
}
int main() {
stack<int> mystack;
string str; //30位的数字
while (getline(cin, str)) {
while (str.size() != 0) {
//最低位的值,因为是除2的话,其实只用看最后一位是奇数还是偶数
int last = str[str.size() - 1] - '0';
mystack.push(last % 2); //取模
str = divide(str, 2); //整除
}
while (!mystack.empty()) { //依次输出
int t = mystack.top();
mystack.pop();
printf("%d", t);
}
printf("\n");
}
}
// 64 位输出请用 printf("%lld")