Count the Words
Count the words in the line. Words are separated by one or more spaces; the line may start or end with spaces.
Input
One line of text.
Output
The number of words.
Constraints
1 to 1000 characters, at least one word.
Sample 1
Input
hello world
Output
2
Sample 2
Input
many spaces here
Output
3