#302. 字符串特定模式计数

    ID: 302 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatString-2gesp3字符串循环结构

字符串特定模式计数

Count "co_e" Occurrences

Background

Dawei is studying string pattern matching problems.

Problem Description

Return the number of times that the string "code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.

Input Format

Input is given from Standard Input in the following format.

A single line containing a string ss.

Output Format

Output is to Standard Output in the following format.

A single line containing an integer, representing the number of occurrences of the pattern.

Sample

aaacodebbb
1
codexxcode
2
cozexxcope
2

Sample Explanation

Sample 1: In the string "aaacodebbb\