integer::N 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 print '(a)', (/REPEAT('1',N/2)/) else print '(2a)', (/'7',REPEAT('1',N/2-1)/) end if end program