'use strict'

function main(input) { 
  input = input.split('')

  const ans = input[0]+(input.length-2).toString()+input[input.length-1]
  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))