'use strict'

function main(input) {
  input = input.split('\n')[0].split('')

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