function Main(input) {
  var mae = input.slice(0,1);
  var ato = input.slice(input.length - 1, input.length);
  console.log(mae + (input.length - 2) + ato);
}

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