#P952E. Cheese Board

Cheese Board

Description

Not to be confused with chessboard.

The first line of input contains a single integer N (1 ≤ N ≤ 100) — the number of cheeses you have.

The next N lines describe the cheeses you have. Each line contains two space-separated strings: the name of the cheese and its type. The name is a string of lowercase English letters between 1 and 10 characters long. The type is either "soft" or "hard. All cheese names are distinct.

Output a single number.

Input

The first line of input contains a single integer N (1 ≤ N ≤ 100) — the number of cheeses you have.

The next N lines describe the cheeses you have. Each line contains two space-separated strings: the name of the cheese and its type. The name is a string of lowercase English letters between 1 and 10 characters long. The type is either "soft" or "hard. All cheese names are distinct.

Output

Output a single number.

9<br>brie soft<br>camembert soft<br>feta soft<br>goat soft<br>muenster soft<br>asiago hard<br>cheddar hard<br>gouda hard<br>swiss hard<br>
6<br>parmesan hard<br>emmental hard<br>edam hard<br>colby hard<br>gruyere hard<br>asiago hard<br>
3<br>
4<br>