n=STDIN.gets.to_i keta=n/2 n7=0 if 1+(n-3)/2==keta n7=1 end n7.times do |i| print 7 end ((n-n7*3)/2).times do |i| print 1 end puts ""