integer::N character(len=50000)::ans='' read *,N if(N.eq.2) then print '(a)','1' else if(N.eq.3) then print '(a)','7' else if(MOD(N,2).eq.0) then ans = REPEAT('1',N/2) print '(a)', TRIM(ans) else ans = '7'//REPEAT('1',N/2-1) print '(a)', TRIM(ans) end if end program