def get_latest_words_length():
line = input()
if len(line) > 5000:
print("the line length over max size: 5000")
else:
print(len(line.split(" ")[-1]))
if __name__ == '__main__':
get_latest_words_length()
def get_latest_words_length():
line = input()
if len(line) > 5000:
print("the line length over max size: 5000")
else:
print(len(line.split(" ")[-1]))
if __name__ == '__main__':
get_latest_words_length()