object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val iobuf = readLine.split(" ").head
    val ans = iobuf.head + (iobuf.length - 2).toString + iobuf.last
    println(ans)
  }
}
