"use strict";
function main(input) {
    input = input.split("\n")[0];
    console.log(input.slice(0, 1) + `${input.length - 2}` + input.slice(-1));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
