#2. 視頻推薦 Video Recommendation

Memory limit: 256 MiB Time limit: 1000 ms Input file: stdin Output file: stdout
Problem type: traditional Judging mode: text compare
Uploded by root

Description

當今的視頻網站大多有視頻推送功能。在推送的頁面上,出現的視頻的順序由用戶常看的視頻類型和每一個視頻的“評分”決定。視頻的“評分”往往與點贊數、點踩數、播放量、完播率、評論數等有關。

在本題中,我們採用一種簡單的“評分”計算方法,即 “評分” = 點贊數 - 點踩數

現有 n 個人在觀看某一視頻後留下了評價,每個人的評價為點贊(用 \texttt{like} 表示)或點踩(用 \texttt{dislike} 表示),求該視頻的“評分”。


Today, most social media platforms will recommend videos to users. On the page having that function, videos appear in a certain order, according to both the user preference and the ratings of videos. The rating of a video is related to likes, dislikes, finish rate and comments. In this problem, we adopt a simplified approach to calculate the rating of a video, that is, rating = likes - dislikes .

There are n people leaving a comment after watching a video, which is either a like or a dislike. You are asked to calculate the rating of this video.

Input

第一行一个整数 n

接下来 n 行,每行一个字符串,为 “ \texttt{like} ” 或 “ \texttt{dislike} ” 之一,表示观众留下的评价。

第一行一個整數 n

接下來 n 行,每行一個字符串,為 “ \texttt{like} ” 或 “ \texttt{dislike} ” 之一,表示觀眾留下的評價。

The first line of the input contains an integer n .

In the following n lines, each line contains a string, which is either \texttt{like} or \texttt{dislike} , representing the comment left by an audience.

Output

一个整数,表示视频的“评分”。

一個整數,表示視頻的“評分”。

Write an integer in one line, representing the rating of the video.

Sample

Sample 1 input

5
dislike
dislike
dislike
like
dislike

Sample 1 output

-3

Constraint and hint

对于全部测试数据,满足 1\leq n \leq 10^5

對於全部測試數據,滿足 1\leq n \leq 10^5

For all test data, 1 \leq n \leq 10^5 .