n=gets.to_i print n.odd? ? ?7 : ?1 n-=2 n/=2 n.times{print ?1} puts