solve :: String -> String
solve s =
    [c1] ++ (show n) ++ [c2]
    where
        c1 = head s
        c2 = last s
        n = (length s) - 2

main :: IO()
main = do
    s <- getLine
    putStrLn $ solve s
