'use strict'

function main(s) {

  const str = s.split('\n')[0].split('');
  const first_char = str[0];
  const mid_length = str.slice(1, -1).length;
  const last_char = str[str.length - 1];
  const ans = first_char + mid_length + last_char;
  console.log(ans);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
