import java.io.*;
import java.math.BigInteger;
public class Main {
    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;

        while ((s = br.readLine()) != null) {
            System.out.println(toBinary(s));
        }
    }
    public static String divide2(String s) {
        int carry = 0;// 记录首部除2余数
        StringBuilder sb = new StringBuilder();
        // 将s除2,从首部开始
        for (char c : s.toCharArray()) {
            int x = c - '0' + carry * 10;
            sb.append(x / 2);
            carry = x % 2;
        }
        // 为什么不考虑最后carry=1?因为在方法 中取最后%2余数
        // 去首部0
        return sb.substring(sb.charAt(0) == '0' ? 1 : 0, sb.length()).toString();
    }

    public static String toBinary(String s) {
        StringBuilder sb = new StringBuilder();
        while (!s.equals("")) {
            int lastChar = s.charAt(s.length() - 1) - '0'; //每次只需计算末尾
            sb.append(lastChar % 2);
            s = divide2(s);
        }
        return sb.reverse().toString();//结果反转
    }



}