
import java.util.*

fun main( argv : Array<String> ) {
    
    val scan = Scanner(System.`in`)
    
    //
    val S = scan.next()
    //
    val n = S.length
    //
    println( "${S[0]}${n-2}${S[n-1]}" )

}

