module Main where

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

main :: IO ()
main = do
    ss <- getLine
    let ans = [head ss] ++ (show $ length ss - 2) ++ [last ss]
    putStrLn ans