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