'''input
internationalization
i18n
'''

# -*- coding: utf-8 -*-

# AtCoder Beginner Contest
# Problem B

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

'''input
internationalization
i18n
'''

# -*- coding: utf-8 -*-

# AtCoder Beginner Contest
# Problem B

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

input
 internationalization
 i18n # -*- coding: utf-8 -*- # AtCoder Beginner Contest # Problem B