function main(input) {
  var first = input[0];
  var length = input.length - 2;
  var last = input[input.length - 1];
  console.log(first + length + last);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));