#include<bits/stdc++.h>
using namespace std;
char s[101];
int main()
{
    int left,right,sum;
    char t[11];
    cin>>s;
    for(int i=0; i<strlen(s); i++)
        if(isalpha(s[i]))
        {
            left=i;
            break;
        }
    for(int i=strlen(s); i>0; i--)
        if(isalpha(s[i]))
        {
            right=i;
            break;
        }
    sum=right-left-1;
    sprintf(t, "%d", sum);
    cout<<s[left]<<t<<s[right]<<endl;
    return 0;
}