Skip to content
UPEEC

Count the Words

Easy#strings· solved by 0 · time limit 2.0 s

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

Sign in or join free to run and submit your solution.