Under construction

Still being built. Things may change

Counting points

Time limit1sMemory limit1024 MB

Summary
Given a string of n test results (T or N), count the groups of n/10 consecutive tests where every test is solved, and print that count.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

The jury of the Potyczki Algorytmiczne is tired of counting points for every submission. Write a program that automates this process.

Each problem awards between 0 and 10 points. A problem has nn tests, where nn is divisible by 10. A solution earns 1 point if it solves all of the first n/10n/10 tests. It earns another point if it solves all of the next n/10n/10 tests. Each group of n/10n/10 tests can earn its point independently, but only if every test in that group is solved correctly. A single mistake in a group means that group earns no point.

Note: To keep things simple, we assume every test group has the same number of tests. In a real contest, this may not be true.

Note 2: Any code you write may be used against you.*

  • A cosmonaut joke.

Input

The first line contains an integer nn (10≤n≤10010 \le n \le 100, nn is divisible by 10), the number of tests.

The second line contains a string of nn characters, each either 'T' or 'N'. 'T' means the test was solved correctly. 'N' means it was not.

Output

Print one integer, the number of points earned.

Hint

Explanation of the first example: The solution earns one point each for groups 1, 3, and 10. Groups 4 and 5 are partially solved, so they earn no points.

Examples1

  1. Example 1

    Input
    20
    TTNNTTNTNTNNNNNNNNTT
    
    Expected output
    3