<?php $input = trim(fgets(STDIN)); $output = ( $input % 2 ) == 1 ? ( '7'.str_repeat( '1', ( $input / 2 ) - 1 ) ) : str_repeat( '1', (($input + 2 ) / 2) - 1 ); print $output;