#include <vector>
#include <string>
#include <iterator>
using namespace std;
int main(){
vector<int> A;
int i;
cin >> i;
int x = i;
int t = x % 2;
while(x>0){
if(t==0){
A.push_back(2);
x = (x-2)/2;
t = x % 2;
}
else{
A.push_back(1);
x = (x -1) /2;
t = x % 2;
}
}
for(int i= A.size()-1; i>=0;--i){
cout << A[i];
}
return 0;
}