#include <stdio.h>
#include <stdlib.h>

int main() {
    int n = 0, cnt = 0;
    scanf("%d", &n);
    char a[(n - 1) / 2];
    //printf("n=%d\n", n);
    while(n > 0)
    {
        if(n % 2 == 0)
        {
            n = (n - 2) / 2;
            a[cnt++] = '3';
        }
        else
        {
            n = (n - 1) / 2;
            a[cnt++] = '2';
        }
        //printf("n=%d cnt=%d a=%c\n", n, cnt, a[cnt-1]);
    }
    for(int i = cnt -1; i >= 0; i--)
    {
        printf("%c", a[i]);
    }
        printf("\n");
    return 0;
}