#include <iostream>
using namespace std;
int main()
{
int a;
const int n = 2;
int res[128];
while(cin >> a) {
for( int i = 0;;i++) {
res[i] = a%n;
a /= n;
if(a < 1) {
for(int j = 0;;j++) {
cout<<res[i];
i--;
if(res[i] <= -1) {
i = -1; //i值設為-1
break;
}
}
}
if(i == -1) //跳離迴圈
break;
}
cout<<endl;
}
return 0;
}