QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 512 MB Puntuación total: 10

#5232. Counting points [C]

Estadísticas

The jury of the Potyczki Algorytmiczne is tired of constantly counting points for all submissions. Help them automate this process.

In each task, one can earn from 0 to 10 points. For a certain task, $n$ tests are prepared, where $n$ is divisible by 10. If a solution correctly solves all of the first $\frac{n}{10}$ tests, it receives 1 point. If it correctly solves the next $\frac{n}{10}$ tests, it also receives 1 point. For each group of $\frac{n}{10}$ tests, 1 point can be earned independently, provided that all tests in that group are solved correctly. If even one mistake is made in a group, no point is awarded for that group.

Note: For simplicity, we assume that each group of tests contains the same number of tests. In a real competition, this might not be true.

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

Input

The first line of standard input contains an integer $n$ ($10 \le n \le 100$; $n$ is divisible by 10), representing the number of tests.

The second line of input contains a string consisting of $n$ letters 'T' or 'N'. The letter 'T' means that the given test was solved correctly. The letter 'N' means it was not solved correctly.

Output

The only line of standard output should contain a single integer equal to the number of points earned.

Examples

Input 1

20
TTNNTTNTNTNNNNNNNNTT

Output 1

3

Note

The solution should receive one point each for correctly solved groups number 1, 3, and 10. No points are awarded for partially solved groups 4 and 5.

*Astronaut joke.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.