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