import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val word: String = sc.nextLine()
    println(word.head + (word.split("").length - 2).toString + word.last)
  }
}
