import java.util.Scanner

object Main {
  def i18n(str: String): String = {
    return str.head.toString + (str.length-2).toString + str.last.toString
  }
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val s = sc.next()
    val ans = i18n(s)
    println(ans)
  }
}
