using System; public class Program { public static void Main() { int x = int.Parse(Console.ReadLine() ?? string.Empty); //string[] pass = (Console.ReadLine() ?? string.Empty).Trim().Split(' '); //string a = Console.ReadLine() ?? string.Empty; string num = ""; if(x % 2 == 0) { int aa = x / 2; for (int i = 1; i <= aa;i++) { num += "1"; x -= 2; } } else { int aa = x / 3; for (int i = 1; i <= aa; i++) { num += "7"; x -= 3; } if (x == 2 ) { num += "1"; //x -= 2; } } Console.WriteLine(num); } }