#include<iostream>
using namespace std;
int main() {
int n, nn = 0, p = 1;
cin >> n;
while (n != 0) {
nn = nn + p * (n % 2);
p *= 10;
n /= 2;
}
cout << nn;
return 0;