import Control.Monad
import Control.Applicative
import Data.List
import Data.Array
strToInt s = (read :: String -> Int) s

main = do
   s <- getLine
   
   let h = head s
   let l = last s
   let n = show ( (length s) - 2 )
   putStrLn $ [h] ++ n ++ [l]