function Main(input) {
  input = input.trim()
  input = input.split("").map(Number);
console.log(input[0]+""+input.length-2+""+input[input.length-1]);
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));