function Main(input) {
  	arr = input.split('');
	var in_len = arr.length - 2;
  	var first_len = arr[0];
  	var end_len = arr[arr.length - 1];
  	console.log(first_len + in_len + end_len );
}
Main(require('fs').readFileSync("/dev/stdin","utf8"));