#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ios_base::sync_with_stdio(false);
    string s;
    cin>>s;
    int l=s.length();
    cout<<s[0]<<l-2<<s[l-1];
    return 0;
}
