e-olymp
Competitions

Programming Principles 1. Week 6. October 7 - 13. PART 2

Number of sentences

Find the number of sentences in the text. Consider a sentence ending with one of the characters "." (point), "!" (exclamation point) or "?" (question mark), but there are no character sets like "...", "!!!" и "?!" in the text.

Input

One line of text that consists of Latin characters, punctuation marks and spaces.

Output

Print the number of sentences in the text.

Time limit 1 second
Memory limit 128 MiB
Input example #1
Hello, world!
Output example #1
1
Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"