import scala.io.StdIn

object Main extends App {
  val s = StdIn.readLine
  val ans = {
    val len = s.length -2
    val sb = StringBuilder.newBuilder
    sb.append(s.charAt(0))
      .append(len)
      .append(s.charAt(s.length-1))
    sb.toString
  }
  println(ans)
}