#include <iostream>
#include <cstdio>
#include "cstring"
#include "algorithm"
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>//Hash_map:因为标准化的推进,hash_map属于非标准容器,未来将要用:boost中tr1中的unordered_map替代之
using namespace std;
const int Maxn=1000;
int f(int n){
if(n==0)return 0;
else {
f(n/2);
cout<<n%2;
}
return 0;
}
int main(int argc, const char * argv[]) {
int n;
while (~scanf("%d",&n)) {
if(n==0)cout<<0<<endl;
else f(n);
cout<<endl;
}
return 0;
}