a = '' n = gets.to_i a += '11' * (n / 4) n %= 4 a = '7' * (n / 3) + a n %= 3 a += '1' * (n / 2) n %= 2 puts a