Under construction

Still being built. Things may change

ZOAC 6

Interview

Time limit1sMemory limit1024 MB

Summary
Count the sentences that contain the substring 01 or OI, since each such sentence gets one Yeongil emoticon.
Level

Easy2 of 10

Topics
String, String matching
Solved
No attempts yet

Problem

In September 2023, Seongu, who once again opened ZOAC for its sixth edition, decided to promote the contest with Yeonggwail's mascot, Yeongil.

When given a promotional text, Seongu adds one Yeongil emoticon at the end of each sentence that contains 01 or OI. Find the total number of Yeongil emoticons Seongu must add to the promotional text.

Input

The first line contains the number of sentences NN in the promotional text. (1≤N≤500)(1 \leq N \leq 500)

From the second line, the next NN lines each contain a sentence SS. It is guaranteed that SS consists only of English letters and digits, with no spaces. (1≤∣S∣≤500)(1 \leq |S| \leq 500)

Output

Print the number of Yeongil emoticons added to the promotional text.

Examples2

  1. Example 1

    Input
    4
    zoacisgoodcontest
    2018to2023
    hello
    JOIN
    
    Expected output
    2
    
  2. Example 2

    Input
    4
    SPOILER
    HARD
    OI01OI
    OioioI
    
    Expected output
    2