function main(input) {
  input=input.trim();
  var s = input.split(" ")[0];
  var n=s.length-2
  console.log(s.substr(0,1)+n+s.substr(s.length-1));

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));