# import bisect

# import copy

# import fractions

# import math

# import numpy as np

# from collections import Counter, deque

# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product



def resolve():



    s=str(eval(input()))



    print((s[0]+str(len(s)-2)+s[-1]))



resolve()
def resolve():



    s=str(eval(input()))

    print(('{}{}{}'.format(s[0],len(s)-2,s[-1])))



resolve()
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product
def resolve():
    s = str(eval(input()))
    print((s[0] + str(len(s) - 2) + s[-1]))


resolve()

def resolve():
    s = str(eval(input()))
    print(("{}{}{}".format(s[0], len(s) - 2, s[-1])))


resolve()

-# import bisect -# import copy -# import fractions -# import math -# import numpy as np -# from collections import Counter, deque -# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product -    print((s[0] + str(len(s) - 2) + s[-1])) +    print(("{}{}{}".format(s[0], len(s) - 2, s[-1])))