Олимпиадный тренинг

Задача 19886. Bit++


Задача

Темы:
 
The classic programming language in Bitland — Bit++. This language is very unusual and complex!
 
The peculiarity of the Bit++ language is that it has exactly one variable called x. There are also two operations in this language:
 
The ++ operation increments the value stored in x by 1.
The -- operation decrements the value stored in variable x by 1.
Sentence in Bit++ language — is a sequence consisting of exactly one operation and exactly one variable x. The sentence is written without spaces, that is, it can only contain symbols: "+", "-", "X". To execute a sentence means to perform the operation contained in the sentence.
 
Program in Bit++ language — it is a sequence of sentences, each of which is required to be performed. To execute a program means to execute all its sentences.
 
You are given a program in the Bit++ language. The value 0 is stored in the x variable before the program is executed. Run the program and output the value that will be stored in the x variable after the program is executed.
 
Input data
The first line contains a single integer n (1 ≤ n ≤ 150) — the number of offers in the program. Each of the next n lines contains a sentence. Each sentence consists of exactly one operator (++ or --) and exactly one variable x (represented by the letter "X"). Thus, there are no empty sentences. The operation and the variable can be written in any order.
 
Output
Print a single integer — the value that will be stored in the variable x after the program is executed.