import std.algorithm;
import std.array;
import std.conv;
import std.range;
import std.stdio;
import std.string;

void main()
{
    auto nums = [6, 2, 5, 5, 4, 5, 6, 3, 7, 6];
    int n;
    scanf("%d", &n);
    int len = n / 2;
    
    while (len > 0)
    {
        foreach_reverse (i; 0..10)
            if ((len - 1) * 2 <= n - nums[i])
                {
                    write(i);
                    n -= nums[i];
                    break;
                }
        len = len - 1;
    }
}