let string_of_char = String.make 1

let solve s =
  let len = String.length s in
  string_of_char s.[0] ^ string_of_int (len - 2) ^ string_of_char s.[len - 1]

let _ = read_line () |> solve |> print_endline