def get_len():
input_str = input()
word = input_str.strip().split(' ')[-1]
if len(word)>5000 or len(word) == 0:
return "重新输入"
return len(word)

print(get_len())