N = int(input()) n = '' while(N>3): N -= 2 n += '1' if(N == 3): n += '7' else: n += '1' print(int(n))