"use strict";
    
const main = arg => {
    const S = arg.split("\n")[0].split("");
    const head = S[0];
    const tail = S[S.length - 1];
    
    S.shift();
    S.pop();
    
    console.log(head + S.length + tail);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));