#include <stdio.h>
void fun(int n);
int main() {
    int a, b;
    while (scanf("%d", &a) != EOF) { // 注意 while 处理多个 case
        // 64 位输出请用 printf("%lld") to
        fun(a);
    }
    return 0;
}

void fun(int n) {
    int x, t = n, cnt = 0;
    while (t > 0) {
        x = t % 2;
        t /= 2;
        cnt++;
    }
    int s[cnt];
    int i = 0;
    t = n;
    while (t > 0) {
        s[i++] = t % 2;
        t /= 2;
    }
    for (i = 0; i < cnt; i++) {
        printf("%d", s[cnt - i - 1]);
    }
    printf("\n");
}