function main(input) {
  const s = input.split('');
  
  const a = s[0];
  const b = s.length - 2;
  const c = s[s.length - 1];
  
  const result = a+b+c;
  
  console.log(result.trim(' '));
  
  
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'));