#include<bits/stdc++.h>
using namespace std;
using ll = long long;
void solve(){
ll n;
while(cin>>n){
if(n==0){
cout<<0<<"\n";
continue;
}
string s;
do{
s.push_back(n%2+'0');
n/=2;
}while(n);
reverse(s.begin(),s.end());
int pos = s.find('1');
cout<<s.substr(pos)<<"\n";
}
}
int main(){
solve();
return 0;
}
//}