Under construction

Still being built. Things may change

Results Table

Time limit2sMemory limit1024 MB

Summary
Count the rows of a results table that contain at least one '+' character, which marks a solved problem.
Level

Easy1 of 10

Topics
Implementation, String
Solved
No attempts yet

Statement

Ralph and Vanellope, while travelling through games, accidentally ended up on the computer of a programming olympiad participant. The participant was given nn problems, and each problem could be submitted at most mm times.

The results table has nn rows and mm columns. The cell in row ii and column jj contains one of the following characters:

  • +: the jj-th submission for problem ii is correct.
  • -: the jj-th submission for problem ii is incorrect.
  • .: problem ii has no jj-th submission.

Vanellope explained to Ralph that only the first correct submission for each problem counts, and any later submissions do not affect the participant's result. Ralph wondered how many of the given problems the participant solved.

Input

The first line contains two integers nn and mm, the number of problems and the maximum number of submissions for one problem (1≤n,m≤1001 \le n, m \le 100).

Each of the next nn lines contains mm characters +, -, or ., describing the results table.

It is guaranteed that once a . appears in a row, only . characters follow it.

Output

Print a single integer, the number of problems the participant solved correctly.

Examples2

  1. Example 1

    Input
    4 5
    ---+.
    +....
    -----
    -+-..
    
    Expected output
    3
    
  2. Example 2

    Input
    1 4
    -++-
    
    Expected output
    1