N = gets.to_i ans = if N % 2 == 0 "1" * (N / 2) else "7" + "1" * ((N - 3) / 2) end puts ans