#!/usr/bin/env python3
#fileencoding: utf-8

N = int(input())

if N == 3:
    print(7)
else:
    ans = ["1" for i in range(N//2)]
    N -= N//2 * 2
    if N == 1:
        ans.pop()
        ans.append("7")
    print("".join(sorted(ans,reverse=True)))