n = int(raw_input()) t = n s = "" while t > 1: if t % 2 == 1: s = s + "7" t = t - 3 elif t >= 2: s = s + "1" t = t - 2 print int(s)