string1=input() list1 = string1.split() last_word_length=len(str(list1[-1])) print(last_word_length)