{-# LANGUAGE FlexibleContexts, OverloadedStrings #-}
import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Char8 as B
import Data.Maybe (fromJust)
import Text.Printf
import Debug.Trace

main = do
  s <- B.getLine
  putStrLn $ [B.head s] ++ (show (B.length s - 2)) ++ [B.last s]