Under construction

Still being built. Things may change

Democracy

Time limit0.5sMemory limit1024 MB

Summary
Count the candidates that get more than half of the M votes in favor, where each candidate's votes are given as a string of O and X.
Level

Easy2 of 10

Topics
Implementation, String
Solved
No attempts yet

Problem

The monthly Hyangyu gathering decides which problem candidates get used by majority vote. Each of the NN candidates is judged by MM committee members, and each member votes in favor or against. A candidate that receives a majority of votes in favor is included. MM is always odd.

Given the votes of the committee members on each candidate, find the number of problems that will be included.

Input

The first line contains the number of candidates NN and the number of committee members MM, separated by a space. (1≤N≤1001 \le N \le 100; 1≤M≤991 \le M \le 99; MM is odd)

Each of the next NN lines contains a string of length MM showing the committee's votes on one candidate. The ii-th character is O if the ii-th member votes in favor, and X otherwise.

Output

Print the number of problems that will be included.

Examples3

  1. Example 1

    Input
    2 3
    OOX
    OXX
    
    Expected output
    1
    
  2. Example 2

    Input
    3 3
    OOX
    OOX
    OOX
    
    Expected output
    3
    
  3. Example 3

    Input
    3 3
    OXO
    XXO
    OOO
    
    Expected output
    2