import sys def get_last_word_len(words): if words.strip() == '': return 0 else: words = words.strip() return len(words.split(' ')[-1]) if __name__ == '__main__': words = sys.stdin.readline().strip() word_len = get_last_word_len(words) print(word_len)