function Main(input) {
	var sText = input[0];
        var cText = input.length-2;
	var eText = input[input.length-1];
        console.log(sText+cText+eText);
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));