function Main(input) {
  var s = input[0];
  var n = String(input.slice(1, -1).length);
  var e = input[input.length-1];
  var ans = s + n + e;
  console.log(ans);
}

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