line = gets.to_i
ans = 0
(0...line / 2).each { |i| ans += 10**i }
ans += 6 * 10**(line / 2 - 1) if line.odd?

p ans