s = eval(input())

print(f'{s[0]}{len(s) - 2}{s[-1]}')
def main():

    s = eval(input())

    print(f'{s[0]}{len(s) - 2}{s[-1]}')





if __name__ == '__main__':

    main()

s = eval(input())
print(f"{s[0]}{len(s) - 2}{s[-1]}")

def main():
    s = eval(input())
    print(f"{s[0]}{len(s) - 2}{s[-1]}")


if __name__ == "__main__":
    main()

-s = eval(input()) -print(f"{s[0]}{len(s) - 2}{s[-1]}") +def main(): +    s = eval(input()) +    print(f"{s[0]}{len(s) - 2}{s[-1]}") + + +if __name__ == "__main__": +    main()