N=int(input ()) Q=N//2 R=N%2 M=0 T=1 for i in range(Q): M+=T T*=10 if R==1: M*=7 M-=6 print (M)