import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        StringBuilder sb = new StringBuilder();
        while(N > 0) {
            if((N & 1) == 0) {
                N = (N - 2) >> 1;
                sb.append('3');
            } else {
                N = (N - 1) >> 1;
                sb.append('2');
            }
        }
        System.out.println(sb.reverse());
    }
}