n = gets.to_i
a = '1' * (n / 2)
a[0] = '7' if n % 2 == 1
puts a