Easystrings
Count Words
Time limit 2 s · Memory 64 MB
Statement
You are given one line. Words are separated by one or more spaces; there may also be spaces at the start and the end of the line. Print the number of words.
Constraints
String length is between 1 and 10^5
Examples
Input 1
hello world
Output 1
2
Input 2
leading and trailing
Output 2
3