object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val r = "(.)(.+)(.)".r
  val omission = sc.next() match {
    case r(head, mid, last) => s"$head${mid.length}$last"
  }
  println(omission)
}
