function Main(inp) {
    var input = inp.split("\n");
    var s = input[0];
    var num = s.length - 2;
    var result = s[0] + num + s[s.length - 1];
    console.log(result);
}

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