cho.sh
Notes
Loading...

Word Count

Time limit

2s

Memory limit

128 MB

Problem

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.

Input

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.

Output

Print the number of words in the string.