import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm;

void main()
{
    auto N = readln.strip.to!int;

    (N % 2 ? 7 : 1).write;
    iota(N / 2 - 1).each!(_ => write(1));
    writeln;
}