Problem:
 Score : 200 points    Problem Statement The word internationalization is sometimes abbreviated to i18n .
This comes from the fact that there are 18 letters between the first i and the last n .  You are given a string s of length at least 3 consisting of lowercase English letters.
Abbreviate s in the same way.      Constraints  3 ≤ |s| ≤ 100 ( |s| denotes the length of s .)  s consists of lowercase English letters.         Input Input is given from Standard Input in the following format:  s       Output Print the abbreviation of s .        Sample Input 1 internationalization      Sample Output 1 i18n       Sample Input 2 smiles      Sample Output 2 s4s       Sample Input 3 xyz      Sample Output 3 x1z

Solution (Python):
s = input()

s_dash = s[1:-1]
print("{}{}{}".format(s[0], len(s_dash), s[-1]))

Solution (Python):
def main():
    s = input()
    ans = s[0] + str(len(s)-2) + s[-1]
    print(ans)

main()

Solution (Python):
s = input()
ls = len(s)-2
print(s[0] + str(ls) + s[-1])

Solution (Python):
s = input()
print(s[0],end='')
print(len(s)-2,end='')
print(s[len(s)-1])

Solution (Python):
s = input()

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

Solution (Python):
a, *b, c = input()
print(a + str(len(b)) + c)

Solution (Python):
s=input()
print(s[0]+(str(len(s)-2))+s[-1])

Solution (Python):
a = input()
print(a[0] + str(len(a) - 2) + a[len(a)-1])

Solution (Python):
s = input()

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

Solution (Python):
def main():
    s = input()
    print(s[0] + str(len(s)-2) + s[-1])


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
s1 = s[0] + str(len(s) - 2) + s[-1]
print(s1)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input();print(s[0] + str(len(s) -2) + s[-1])

Solution (Python):



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

Solution (Python):
s = list(input())
count = 0
for i in range(1,len(s)-1):
  count += 1
print(str(s[0])+str(count)+str(s[len(s)-1]))

Solution (Python):

s = input()
ss = s[1:len(s)-1]
print('{}{}{}'.format(s[0], len(ss), s[len(s)-1]))

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input().strip()
print('{}{}{}'.format(s[0], len(s[1:-1]), s[-1]))

Solution (Python):
s = input()

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

Solution (Python):
s=input()
a=s[0]
b=s[-1]
m=str(len(s)-2)
print(a+m+b)

Solution (Python):
s = input()

r0=len(s)-1
r=len(s)-2
rs=str(r)
print(s[0] + rs + s[r0])

Solution (Python):
s = list(input())
l = len(s)
print(s[0]+str(l-2)+s[-1])

Solution (Python):

s = input()

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

print(ans)

Solution (Python):
s=input()
k=str(len(s)-2)
print(s[0]+k+s[-1])

Solution (Python):
a=input()
print(str(a[0])+str(len(a)-2)+str(a[-1]))

Solution (Python):
S = input()
print(S[0]+ str(len(S)-2) + S[-1])

Solution (Python):
s = input()
l = len(s) - 2
y = s[0] + str(l) + s[-1]

print(y)

Solution (Python):
s = input()
l = len(s)

print('%s%d%s' % (s[0], l-2, s[-1]))

Solution (Python):
s=input()
n=len(s)
print(s[0]+str(n-2)+s[n-1])

Solution (Python):
a = list(str(input()))
a[1:len(a)-1] = [str(len(a)-2)]
print("".join(a))

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1]))  + s[-1])

Solution (Python):
S = input()
print(S[0] + str(len(S) - 2) + S[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
l = len(s) - 2
ans = s[0] + str(l) + s[-1]
print(ans)

Solution (Python):
words = input()
print(words[0] + str(len(words)-2) + words[len(words)-1])

Solution (Python):
a, *b, c = input()
print(a + str(len(b)) + c)

Solution (Python):
row = input().split()
s = list(row[0])
num = len(s) - 2
ans = []
ans.append(s[0])
ans.append(num)
ans.append(s[len(s)-1])
ans = list(map(str, ans))
print("".join(ans))

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
def main():
    s = input()
    print(s[0] + str(len(s[1:-1])) + s[-1])


main()

Solution (Python):



s = list(input())
head, tail = s[0], s[-1]
print(head + str(len(s) - 2) + tail)

Solution (Python):
s = input()
print(s[0]+ str(len(s)-2) + s[len(s)-1])

Solution (Python):
s = input()
print('{0}{1}{2}'.format(s[0], str(len(s)-2),s[-1]))

Solution (Python):
s = str(input())

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

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
l = list(input())
a = len(l)
print(l[0] + str(a-2) + l[a-1])

Solution (Python):
sin=str(input())
sout=sin[0]+str(len(sin)-2)+sin[len(sin)-1]
print(sout)

Solution (Python):
S = input()
ans = S[0]+str(len(S)-2)+S[-1:]
print(ans)

Solution (Python):

def main():
    data = input()
    ans = data[0] + str(len(data) - 2) + data[-1]
    print(ans)




if __name__ == '__main__':
    main()

Solution (Python):



s = input()

print(s[0], len(s) - 2, s[-1], sep='')

Solution (Python):
s = input()
head_s = s[0]
n = len(s[1:-1])
tail_s = s[-1]
print("%s%d%s" % (head_s, n, tail_s))

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

S = s()

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

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()

sta=s[0]
end=s[-1]

mid=str(len(s)-2)

print(sta+mid+end)

Solution (Python):
from sys import stdin
s = (stdin.readline().rstrip())
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=input()
result = s[0] + str(len(s)-2) + s[len(s)-1]
print(result)

Solution (Python):
a, *b, c =  input()
print(a+str(len(b))+c)

Solution (Python):
def abc():
    s = input().rstrip()
    print(s[0] + str(len(s) - 2) + s[-1])


abc()

Solution (Python):
a = input()
num = len(a)
moji = len(a) - 2
print(a[0]+str(moji)+a[num-1])

Solution (Python):
word = input()
word_len = len(word)
word_s = word[0]
word_e = word[-1]
word_bet = str(word_len - 2)
print(word_s + word_bet + word_e)

Solution (Python):


import sys



s = sys.stdin.readline().rstrip()

length = len(s)


print("{}{}{}".format(s[0], length - 2, s[-1]))

Solution (Python):
s = str(input())
l = len(s) - 2

print(s[0] + str(l) +s[l+1])

Solution (Python):

chars = list(input())




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

Solution (Python):
s = input()
l = len(s[1:-1])
print(s[0]+str(l)+s[-1])

Solution (Python):
s = input()
ans = s[0] + str(len(s)-2) + s[-1]
print(ans)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
x = len(s)
answer = s[0] + str(x-2) + s[-1]
print(answer)

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

S = sys.stdin.readline().rstrip()
print(S[0] + str(len(S) - 2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str((len(s)-2)) + s[-1])

Solution (Python):
s = list(str(input()))
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()

s_len = len(s)

print(s[0],len(s)-2,s[len(s)-1],sep='')

Solution (Python):

import sys


def solve(s: str):
    ret = s[0] + str(len(s) - 2) + s[-1]
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    s = next(tokens)  
    solve(s)

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s=input()
n=len(s)
print(s[0]+str(n-2)+s[n-1])

Solution (Python):
s=input()
l=len(s)-2
print(s[0]+str(l)+s[-1])

Solution (Python):
s = input()
x = len(s)
answer = s[0] + str(x-2) + s[-1]
print(answer)

Solution (Python):
S = input()
cnt = 0
S = list(S)
S_t = S[0]
S.pop(0)
S_b = S[-1]
S.pop(-1)
for i in range(len(S)):
    cnt += 1

print(S_t + str(cnt) + S_b)

Solution (Python):
s = input()
kazu = len(s) - 2
print(s[0], str(kazu), s[-1], sep='')

Solution (Python):
kk = input()
print(kk[0]+str(len(kk)-2) + kk[len(kk)-1:len(kk)-2:-1])

Solution (Python):
a,*b,c=input()


print(a+str(len(b))+c)

Solution (Python):
s = input()

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

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
F, *M, L = list(input())
print(F + str(len(M)) + L)

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = list(input())

l = len(s)-2

ls = [s[0],str(l),s[-1]]

print("".join(ls))

Solution (Python):
s = input()
print(s[0] + str(len(s[1:len(s) - 1])) +  s[len(s) - 1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
strings = input()
a = len(strings) - 2
print(strings[0] + str(a) + strings[len(strings) - 1])

Solution (Python):
s = input()
print(s[0] + str(len(s[:-2])) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()     

s_mid_len = len(s) - 2

T = s[0] + str(s_mid_len) + s[-1]
print(T)

Solution (Python):
s,*d,f=input()
print(s+str(len(d))+f)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
S = input()
print(S[0] + str(len(S[1:len(S)-1])) + S[len(S)-1])

Solution (Python):
s = input()
n = len(s) -2
print(s[0] + str(n) + s[-1])

Solution (Python):
s = list(input())
print(s[0] + str(len(s) - 2) + s[len(s) - 1])

Solution (Python):
s = list(input())
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = (list(input()))
S = s[0] + str(len(s)-2) + s[-1]
print(S)

Solution (Python):
s = input()
print (s[0] + str(len(s)-2)+ s[len(s)-1])

Solution (Python):
if __name__ == '__main__':
    s = str(input())

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

Solution (Python):
from sys import stdin
s = stdin.readline().rstrip()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
word = input()
print("{}{}{}".format(word[0],len(word)-2,word[-1]))

Solution (Python):
a = input()
print(str(a[0]) + str(len(a)-2) + str(a[-1]))

Solution (Python):
s = list(input())
print("{}{}{}".format(s[0], (len(s) - 2), s[len(s)-1]))

Solution (Python):
s = list(input())
f = s[0]
e = s[-1]
s.pop(0)
s.pop(-1)
l = len(s)
print("".join([f, str(l), e]))

Solution (Python):
s = input()
print(s[0]+ str(len(s)-2) + s[-1] )

Solution (Python):
s=input()
top = str(s[0:1])
middle = str(len(s)-2)
tail = str(s[len(s)-1:len(s)])
print(top + middle + tail)

Solution (Python):
s = list(input())
count = len(s) - 2
print('{0}{1}{2}'.format(s[0],count,s[len(s) - 1]))

Solution (Python):
s=input()
print(s[0],end="")
print(len(s)-2,end="")
print(s[len(s)-1])

Solution (Python):
def main():
    S = input()
    print(S[0] + str((len(S) - 2)) + S[-1])


if __name__ == "__main__":
    main()

Solution (Python):
s = input()
print(s[:1] + str(len(s)-2) + s[-1:])

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
n = str(len(s)-2)
print(s[0] + n + s[-1])

Solution (Python):
s = input()

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

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):

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

Solution (Python):
l=input()
n=len(l)-2
print(l[0]+str(n)+l[-1])

Solution (Python):
s = input()

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

Solution (Python):
letter = input("")

length = len(letter) - 2

ans = letter[0] + str(length) + letter[-1]
print(ans)

Solution (Python):
s = input()
s_list = []

for i in s:
    s_list.append(i)

count = len(s_list)-2

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

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
first = s[0]
last = s[-1]
len_s = len(s) - 2
new_s = first + str(len_s) + last

print(new_s)

Solution (Python):
s = input().strip()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
word = s
A = len(s)
B = A - 2
C = word[0]
D = word[-1]
str_B = str(B)
E = C + str_B + D
print(E)

Solution (Python):
ss = input()
print(ss[0]+(str(len(ss)-2))+ss[-1])

Solution (Python):
s = input()
print( s[0] + str(len(s)-2) + s[-1] )

Solution (Python):
s = input()
ans = s[0]+str(len(s)-2)+s[-1]
print(ans)

Solution (Python):
S = input()
print(S[0], len(S[1:-1]), S[-1], sep="")

Solution (Python):
s = input()

count = len(s) -2

print(s[0] + str(count) + s[-1])

Solution (Python):
s=input();print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()

m=str(len(s)-2)

print(s[0]+m+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):


def solve():
    s = input()
    lenS = len(s)
    ans = s[0] + str(lenS-2) + s[-1]
    print(ans)

if __name__ == "__main__":
    solve()

Solution (Python):
k=input()
print(k[0],len(k)-2,k[len(k)-1],sep='')

Solution (Python):
s = input()
print(s[:1] + str(len(s[1:-1])) + s[-1:])

Solution (Python):
s = input()

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

Solution (Python):
s=list(input())
First=s.pop(0)
Last=s.pop(len(s)-1)
print(First+str(len(s))+Last)

Solution (Python):
a, *b, c = input()

print(a + str(len(b)) + c)

Solution (Python):
List = [i for i in input()]

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

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):

s=input()


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

Solution (Python):
S = input()

res = ""
res += S[0]
res += str(len(S[1:-1]))
res += S[-1]

print(res)

Solution (Python):
s=input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s=list(input())
f,l=s.pop(0),s.pop()
print(f+str(len(s))+l)

Solution (Python):
S=list(input())
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0], len(s) - 2, s[-1], sep="")

Solution (Python):
s=input();print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
S = input()
print(S[0] + str(len(S) - 2) + S[-1])

Solution (Python):
from sys import stdin


def main():
    S = stdin.readline().rstrip()
    print(S[0] + str(len(S) - 2) + S[-1])


if __name__ == "__main__":
    main()

Solution (Python):
s=input()
print(s[0] + str(len(s)-2) +s[-1])

Solution (Python):
s = str(input())
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[len(s) - 1])

Solution (Python):
S = input()
print(S[0] + str(len(S) - 2) + S[-1])

Solution (Python):
s=str(input())
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=str(input())
print(s[0],len(s)-2,s[-1],sep="")

Solution (Python):
s = input()
slen = len(s)
l = slen-2

print(s[0] + str(l) + s[slen-1])

Solution (Python):

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

Solution (Python):
x = input()
print(x[0]+str(len(x)-2)+x[-1])

Solution (Python):
a = input()
print(a[0],len(a)-2 ,a[len(a)-1], sep='')

Solution (Python):
string = input()
print(string[:1] + str(len(string) - 2) + string[-1:])

Solution (Python):
letters = input()
n = len(letters)
print(letters[0] + str(n-2) + letters[n-1])

Solution (Python):
s=input()

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

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
strs = input()
print(strs[0]+ str(len(strs)-2) + strs[len(strs)-1])

Solution (Python):
s = str(input())
print(s[0],len(s)-2,s[-1],sep="")

Solution (Python):
S = list(str(input()))
print(S[0] + str(len(S)-2) + S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()

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

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[len(s)-1])

Solution (Python):
s = input()
trans = [s[i:i+1] for i in range(len(s))]
a = len(s) - 2
print(trans[0] + str(a) + trans[-1])

Solution (Python):
s=input()
l=int(len(s))
print(s[0]+str(l-2)+ s[l-1])

Solution (Python):
s = list(input())
s_top = s[0]
s_bottom = s[-1]
num = len(s) - 2
print(s_top + str(num) + s_bottom)

Solution (Python):
s = input()
t = s[0]+str(len(s)-2)+s[len(s)-1]
print(t)

Solution (Python):
s=input()

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

Solution (Python):





s = input()

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

Solution (Python):


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

Solution (Python):
s = input()
l = len(s)
print(s[0]+str(l-2)+s[l-1])

Solution (Python):
s = list(input())
l = len(s)
l -= 2
print(s[0] + str(l) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):

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

Solution (Python):
a = input()
print(a[:1]+str(len(a)-2)+a[-1:])

Solution (Python):
s=input()
p=str(len(s)-2)
print(s[0]+p+s[-1])

Solution (Python):


def read_input():
    s = input().strip()
    return s

def submit():
    s = read_input()
    head = s[0]
    tail = s[-1]
    mid = s[1:-1]

    print(head + str(len(mid)) + tail)


if __name__ == '__main__':
    submit()

Solution (Python):
a = input()
print(a[0] + str((len(a)-2)) + a[-1])

Solution (Python):
S = input()
print(S[0] + str(len(S) - 2) + S[-1])

Solution (Python):
s = input()

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    s = input().strip()
    print(s[0]+ str(len(s)-2)+s[-1])

solve()

Solution (Python):
s = input()

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

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
n = input()
print(n[0] + str(len(n) - 2) + n[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[len(s) - 1])

Solution (Python):
s = list(input())
s_new = []
s_new.append(s[0])
s_new.append(str(len(s)-2))
s_new.append(s[len(s)-1])

print(''.join(s_new))

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()

n = len(s)
ans = s[0] + str(n-2) + s[-1]

print(ans)

Solution (Python):
s = input()
print("{}{}{}".format(s[0],len(s)-2,s[-1]))

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
w = input()
print(w[0] + str(len(w)-2) + w[-1])

Solution (Python):
a = list(map(str,input()))
t = len(a)
s = t-2
s = str(s)
print(a[0]+s+a[t-1])

Solution (Python):
from functools import reduce
import math

def main():
    
    
    
    

    
    
    
    
    
    

    
    

    
    
    
    
    
    
    
    
    
    INF = float("inf")

    
    MOD = 10**9+7
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    s = input().rstrip()
    
    print(s[0]+str(len(s)-2)+s[-1])
    
if __name__ == '__main__':
    main()

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-2])+1) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):

s=list(str(input()))
x=(len(s)-2)

print(s[0],end="") 
print(x,end="")
print(s[-1])

Solution (Python):
def main():
    a = input()

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

main()

Solution (Python):
list = input()
print(list[0]+str(len(list)-2)+list[-1])

Solution (Python):
s = [i for i in input()]
print('{}{}{}'.format(s[0], len(s[1:-1]), s[-1]))

Solution (Python):
s=input()
print(s[0]+"{}".format(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
ans = s[0] + str(len(s)-2) + s[-1]
print(ans)

Solution (Python):
s=input()
s1=s[0]
sl=s[len(s)-1]
n=len(s[1:len(s)-1])
print(s1+str(n)+sl)

Solution (Python):
import math
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()

print("%s%d%s" % (s[0], len(s) - 2, s[-1]))

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
S = list(input())
ans = [S[0], str(len(S)-2), S[-1]]

print(''.join(ans))

Solution (Python):
s = input()
first = s[0]
last = s[-1]
print(first + str(len(s[1:-1])) + last)

Solution (Python):


import itertools
import collections
import bisect

def main():
    s = input()
    print(s[0] + str(len(s[1:-1])) + s[-1])

if __name__ == '__main__':
    main()

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
A=input()
print(A[0]+str(len(A)-2)+A[-1])

Solution (Python):
s = input()
s_ = s[0] + str(len(s[1:-1])) + s[-1]
print(s_)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
S = input()
print(S[0], len(S)-2, S[-1], sep="")

Solution (Python):
s=str(input())
print(s[0]+(str((len(s))-2))+s[-1])

Solution (Python):
s = input()
num = str(len(s[1:-1]))
print(s[0] + num + s[-1])

Solution (Python):
s = list(input())
a = s[0]
b = s[len(s)-1]
print(a + str(len(s)-2) + b)

Solution (Python):

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

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(int(len(s))-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
S = str(input())
count = len(S[1:-1])
print(S[0]+str(count)+S[-1])

Solution (Python):
s=input()
print("{}{}{}".format(s[0],len(s)-2,s[-1]))

Solution (Python):
S = input()
S0 = S[0]
S1 = str(len(S) - 2)
S2 = S[-1]
print(S0+S1+S2)

Solution (Python):
s = input()
num = str(len(s) - 2)
print(s[0] + num + s[len(s)-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[len(s)-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
a,*b,c = input()

print(a+str(len(b))+c)

Solution (Python):
s1,*s2,s3=map(str,input())
print(s1+str(len(s2))+s3)

Solution (Python):
import sys
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())

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

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
n = len(s)
print(s[0]+str(n-2)+s[n-1])

Solution (Python):
n=input()
print(n[0]+str(len(n)-2)+n[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
a,*b,c = map(str,input())
print(a+str(len(b))+c)

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()
x = len(s) - 2
print(s[0],x,s[-1],sep="")

Solution (Python):
s = str(input())

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

Solution (Python):
s = str(raw_input())
ln = str(len(s) - 2)
print s[0] + ln + s[-1]

Solution (Python):
s = input()

ans = ""
ans += s[0]
ans += str(len(s)-2)
ans += s[-1]

print(ans)

Solution (Python):
a, *b, c = input()
print(a, len(b), c, sep="")

Solution (Python):
a, *b, c = input()
print(a + str(len(b)) + c)

Solution (Python):
A=list(input())
a=A[0]
b=A[-1]
c=len(A)-2
print(a+str(c)+b)

Solution (Python):
s=input()
l=len(s)-2
a=''
a+=s[0]
a+=str(l)
a+=s[-1]
print(a)

Solution (Python):
s = input()

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

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
S = list(input())
saisho = S[0]
del S[0]
saigo = S[-1]
del S[-1]
kazu = str(len(S))
print(saisho+kazu+saigo)

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()

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

Solution (Python):
s = input()
print(s[0:1]+str(len(s)-2)+s[len(s)-1:len(s)])

Solution (Python):

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

Solution (Python):
s=input()
print(s[0]+str((len(s)-2))+s[-1])

Solution (Python):
s = input()
n = len(s)
print(s[0] + str(n - 2) + s[-1:])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()

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

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
S = input()
size = len(S)
print(S[:1] + str(len(S[2:size])) + S[size-1:])

Solution (Python):
cnt = 0
s = input()
for i in s[1:-1]:
    cnt += 1
print(s[0] + str(cnt) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input().rstrip()
part = s[1:-1]

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

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    S = list(map(str, input().strip()))
    n = len(S) - 2
    i = S[0]
    e = S[-1]

    ans = str(i) + str(n) + str(e)

    return ans


if __name__ == '__main__':
    print(main())

Solution (Python):


s = input()

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

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
s=input()
length=len(s)-2
first=s[0]
last=s[-1]
print(first+str(length)+last)

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):
hoge=input()
print(hoge[0],end="")
print(int(len(hoge)-2),end="")
print(hoge[-1])

Solution (Python):
s = input()
ans = s[0] + str(len(s[1:-1])) + s[-1]
print(ans)

Solution (Python):
s = input()

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

Solution (Python):
s = str(input())
c = len(s)-2
print(s[0]+str(c)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s = input()
l = len(s)
print(s[0] + str(l-2) + s[l-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1:])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s) - 2) + s[-1])

Solution (Python):
s = input()
l = len(s)
left = s[0]
right = s[l-1]
print(left + str(l-2) + right)

Solution (Python):
def i18n(s: str)->str:
    n = len(s)
    return s[0] + str(n-2) + s[-1]


if __name__ == "__main__":
    s = input()
    ans = i18n(s)
    print(ans)

Solution (Python):
s = str(input())
t = s[0]+str(len(s)-2)+s[-1]
print(t)

Solution (Python):
s = input()
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):

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

Solution (Python):
l = list(input())

print("{}{}{}".format(l[0], len(l)-2, l[len(l)-1]))

Solution (Python):
s = list(input())
n = int(len(s))
print(s[0] + str(n-2) + s[-1])

Solution (Python):
s=str(input())
num=len(s)
n=num-2
s1=s[0]
s2=s[num-1]
ans=s1+str(n)+s2
print(ans)

Solution (Python):
S = input()
print(S[0] + str(len(S)-2) + S[len(S)-1])

Solution (Python):
l=list(input())
print(l[0]+str(len(l)-2)+l[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s=input()

x=s[1:-1]

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

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
s=input();print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
print(s[0]+str(len(s)-2)+s[-1])

Solution (Python):
s=input()
q=len(s)-2
r=list(s)
print(r[0]+str(q)+r[-1])

Solution (Python):
s = list(input())
print(s[0] + str(len(s)-2) + s[-1])

Solution (Python):
S=input()
a=str(len(S)-2)
print(S[:1]+a+S[-1:])

Solution (Python):
a = input()
print(a[0]+str(len(a)-2)+a[-1])

Solution (Python):
a,*b,c=input()
print(a+str(len(b))+c)

Solution (Python):
s = input()
l = len(s)
mannaka = str(l-2)
print(s[0] + mannaka + s[l-1])

Solution (Python):
s = list(input())
print(s[0]+str(len(s[1:-1]))+s[-1])

Solution (Python):
s = input()

n = str(len(s) -2)

print(s[0] + n + s[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s)-2) + s[len(s)-1])

Solution (Python):
S = input()
print(S[0]+str(len(S)-2)+S[-1])

Solution (Python):
s = input()
print(s[0] + str(len(s[1:-1])) + s[-1])

Solution (Python):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)-1])

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007


def A():
    n, m = LI()
    print((n-1)*(m-1))
    return


def B():
    s = S()
    print(s[0]+str(len(s)-2)+s[-1])
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    B()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


"""
n,m = LI()
print((n-1)*(m-1))
"""


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

"""
n = I()
a = LI()
d = [0,0]
for i in a:
    if i%2:
        d[0] += 1
    if i%4 == 0:
        d[1] += 1
if n % 2:
    d[0] -= 1
d[0] -= d[1]
if d[0] <= 0:
    print("Yes")
else:
    print("No")
"""


"""
h,w = LI()
n = I()
a = LI()
c = [[None for x in range(w)] for y in range(h)]
i = 0
for y in range(h):
    if y%2:
        for x in range(w)[::-1]:
            if not a[i]:
                i += 1
            c[y][x] = i+1
            a[i] -= 1
    else:
        for x in range(w):
            if not a[i]:
                i += 1
            c[y][x] = i+1
            a[i] -= 1
for i in c:
    print(*i)
"""

Solution (Python):
def main():
    s = input()
    out = s[0] + str(len(s) - 2) + s[-1]
    print(out)

main()

Solution (Python):
s = str(input())
M = len(s) - 2
print(s[0] + str(M) + s[-1])

Solution (Python):
s=input()
d=str(len(s)-2)
print(s[0]+d+s[len(s)-1])

Solution (Python):
s=input()
print(s[0]+str((len(s)-2))+s[-1])