-- Question B

import Data.List
import Control.Applicative
import Control.Monad

main = do
  n <- getLine
  putStrLn $ check n

check :: String -> String
check n = [head n] ++ show((length n) -2) ++ [last n]

