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