print(len(input().split()[-1]))

用Python的语法糖可以一行解决[doge]