open Batteries
open Printf
let () =
  let s = Scanf.scanf "%s " (fun a -> a) in
  
  let i18n str =
    let len = String.length str in
    if len < 3 then failwith "too small" else
    let fst = String.slice ~last:1 str in
    let mid = string_of_int (len-2) in
    let lst = String.slice ~first:(len-1) str in
    fst ^ mid ^ lst
  in

  Printf.printf "%s\n" @@
  i18n s
