LogiQuest

90. Count Words

EasyStringParsing

Print the number of words in the line. Words are separated by one or more spaces; there may be leading or trailing spaces.

Input format

A single line s (it may contain only spaces).

Output format

The number of words.

Example 1

Input

the quick brown fox

Output

4

Example 2

Input

  hello   world  

Output

2

Constraints

1 ≤ |s| ≤ 10⁵

Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.

Loading the MyLoginn IDE…