n = gets.to_i
if n.odd?
    one_count = (n - 3) / 2
    puts "7" + "1" * ((n - 3) / 2)
else 
    puts "1" * (n / 2)
end