function main(input){
  line = input.trim(); // kill '\n' at the end
  console.log(line[0] + (line.length-2).toString() + line[line.length-1]);
  
}
main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));