eolymp
bolt
Try our new interface for solving problems
Problems

Table of results

Table of results

Ralph and Vanellope, while traveling through the games, absolutely accidentally ended up on the computer of a participant in a programming competition. Moreover, they found out that the participant was offered n problems and for each of them it is possible to submit the solution no more than m times.

The heroes also found a table with the results of testing solutions. The table consists of n rows and m columns. The cell located in the i-th row and j-th column contains the symbol:

  • "+", if the j-th submitted solution for the i-th problem is correct.
  • "-" if the j-th submitted solution for the i-th problem is incorrect.
  • ".", if there were no j-th submitted solution for the ith problem.

Vanellope explained to Ralph that the first correct solution for each problem counts, and all other solutions submitted for this problem do not affect the participant's result in any way.

Ralph became interested in how many tasks from the proposed ones the participant of the Olympiad could solve. But since he is too shy to ask Vanellope for help, help him!

Input

The first line contains two numbers n and m (1n, m100) - the number of tasks and the maximum possible number of sent solutions for one problem, respectively.

Each of the following n lines contains m characters "+", "-" or "." - description of the resulting table.

It is guaranteed that after the character "." only the same characters can appear.

Output

Print one number - the number of problems solved correctly by the participant.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4 5
---+.
+....
-----
-+-..
Output example #1
3
Input example #2
1 4
-++-
Output example #2
1
Source 2018 Цикл Интернет-олимпиад для школьников, вторая командная олимпиада сезона, базовая номинация, November 10, Problem A