N=gets.to_i;puts (N%2==1?"7": "1")+"1"*~-(N/2)