# coding : utf-8 N = int(input()) ans = 1 if N%2==0: cnt = int(N/2)-1 for i in range(0,cnt,1): ans = 10*ans + 1 else: cnt = int((N-3)/2)-1 for i in range(0,cnt-1,1): ans = 10*ans + 1 ans = ans + 6 print(ans)