'use strict'
 
function main(s) {
  let n = s.split('');
  let num = n.length - 2;
  let init = n[0];
  let end = n.slice(-1)[0];
  console.log(init + num + end);
}
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));