let N = System.Console.ReadLine() |> int

if   N<2   then "0"
elif N%2=0 then String.replicate (N/2) "1"
else            "7" + String.replicate ((N-3)/2) "1"
|> printfn "%s"