using System;

class Program83
{
    public static void Main(string[] args)
    {
        var n = int.Parse(Console.ReadLine());
        if (n%2 == 1)
        {
            n -= 3;
            string result = "7";
            for (int i = 0; i < n/2; i++)
            {
                result += "1";
            }
            Console.WriteLine(result);
        }
        else
        {
            string result = string.Empty;
            for (int i = 0; i < n / 2; i++)
            {
                result += "1";
            }
            Console.WriteLine(result);
        }
    }
}