import strutils
var n = stdin.readLine.parseInt
if n mod 2 != 0:
  stdout.write(7)
  n -= 3
stdout.write("1".repeat(n div 2))
echo()