#include<stdio.h>  
#include<iostream>
#include<string.h> 
#include<stdlib.h>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<list>
#include<vector>
#include<cctype>
#include<sstream>
#include<set>
#define INF 0x3f3f3f3f
typedef long long ll;
const ll mod=1e9+7;
using namespace std;
int n,m;
char s[105];
int main()
{
    cin>>s;
    int len=strlen(s);
    cout<<s[0]<<len-2<<s[len-1]<<endl;
    return 0;
}