#!/usr/bin/python
n = int(raw_input())
if n & 1:
    x7 = 1
    x1 = (n-3) / 2
else:
    x7 = 0
    x1 = n / 2
print '7' * x7 + '1' * x1