import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons;

void main() {
    auto s = readln.chomp;
    writefln("%c%d%c", s[0],s[1..$-1].length, s[$-1]);
}

