#!/usr/bin/ruby n=gets.to_i puts '17'[n%2,1]+'1'*(n/2-1)