#include<cstdio>
#include<cstdlib>
#include<cstring>
void *erjinzhi(int n, char *s)
{
char str[100];
int i = 0, j = 0,sign=0;
if (n < 0)
{
s[i++] = '-';
n *= (-1);
sign = 1;
}
while (n >0)
{
str[j++] = (n % 2) + '0';
n /= 2;
}
for (i=(sign==1?1:0), --j; j >= 0; i++, j--)
s[i] = str[j];
s[i] = '\0';
return s;
}
int main()
{
int n;
char b[100];
while (scanf_s("%d", &n))
{
erjinzhi(n, b);
puts(b);
}
system("pause");
return 0;
}