let main () = Scanf.sscanf (read_line()) "%s"
  (fun a -> print_string (Char.escaped (String.get a 0)
    ^ string_of_int ((String.length a) - 2) ^
    Char.escaped (String.get a ((String.length a) - 1))));;

let _ = main ();;