Олимпиадный тренинг

Задача 23093. How many "o"


Задача

Темы: Строки Символы
A sentence is given that does not contain the "-" symbol. Determine the number of letters "o" (English) in the first word. There may be spaces at the beginning of a sentence.

Solve the problem without using the built-in string functions, except for a function that returns the length of a string.

Input: a single line specifies the original sentence.

Output: need to print the number of letters "o" (English) in the first word.

Sample input and output
Test number Input Output
1    fore  sete. 1
2 halah. 0

Запрещенные операторы:find;count