function Main(input){
	// input = inp;
	var tmp = input.split("");
	var n = tmp[0];
	var m = tmp[tmp.length - 1];
	var length = tmp.length - 2;
	console.log(n + length + m);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));