import java.util.Scanner
 
object Main {
  val sc = new Scanner(System.in)
  val s = sc.next
  val length = s.length
 
  val res = s.head.toString + (length - 2).toString + s.last.toString
 
  println(res)
}