using System; class Program { static void Main(string[] args) { if (!int.TryParse(Console.ReadLine(), out var input)) return; string output; if (input < 2) { output = "0"; } else if (input % 2 == 0) { output = new string('1', input / 2); } else { output = "7" + new string('1', (input - 3) / 2); } Console.WriteLine(output); } }