Time limit
2s
Memory limit
128 MB
Given a string consisting of uppercase English letters, lowercase English letters, and spaces, determine how many words it contains. If the same word appears more than once, count each occurrence separately.
The first line contains a string consisting of uppercase English letters, lowercase English letters, and spaces. Its length is at most 1,000,000.
Words are separated by exactly one space. Spaces never appear consecutively, but the string may start or end with a space.
Print the number of words in the string.