'use strict'

function main(input) {
  input = input.trim()
  input = `${input.slice(0, 1)}${input.length - 2}${input.slice(-1)}`
  console.log(input)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))

