program main
  implicit none
  character(100) :: s
  character(2) :: dig
  integer :: n
  read(*, *) s
  n = len(trim(s))
  write(dig, "(i0)") n - 2
  write(*, "(a)") s(1:1) // trim(dig) // s(n:n)
end program main
