using System; using System.Linq; class Program { static void Main(string[] args) { int N = int.Parse(Console.ReadLine()); int threeMs = 0; threeMs = N / 3; N %= 3; if (0 < N % 2) { threeMs -= 1; N += 3; } for (int i = 0; i < threeMs; i++) { Console.Write("7"); } for (int i = 0; i < N / 2; i++) { Console.Write("1"); } Console.WriteLine(); } }