'use strict'
 
function main(n) {
  let init = n.charAt(0);
  let end = n.charAt(n.length - 1);
  let num = n.length - 2;
  console.log(n);
  console.log(`${init}${num}${end}`);
}
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));