function Main(input) {
  const number = input.split('\n')[0].split("");
  const middleNumber = input.substr(1, number.length-2);
  console.log(number[0] + middleNumber.length + number[number.length-1]);
}

Main(require("fs").readFileSync("/dev/stdin","utf8"));
