program main
	implicit none
	character*100 s,a,b
	integer abss
	read(*,*)s
	abss=len_trim(s)-2
	a=s(1:1)
	b=s(len_trim(s):len_trim(s))
	if(abss<10)then
		write(*,'(a1,i1,a1)')a,abss,b
	else
		write(*,'(a1,i2,a1)')a,abss,b
	endif
end program main
