N = input() x = N s = [] while x > 0: if x >= 4 or x == 2: x = x-2 s += "1" elif x == 3: x = x-3 s += "7" print "".join(s)