n = gets.to_i
q, r = n.divmod(2)
print r == 0 ? "1" : "7"
puts "1" * (q - 1)