n = gets.to_i ans = "1" * (n/2) ans[0] = "7" if n%2 == 1 print ans.to_i