n = gets.chomp.to_i sho = n / 2 amari = n % 2 result = "0" if n < 2 elsif amari == 1 result = "1" * ( sho - 1 ) result += "7" else result = "1" * sho end puts result