J. Reload
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Vova got the homework from his teacher. After that he got mail which contains number $$$n$$$ and row in length of $$$9 * n$$$ characters, consisting of capital latin letters. Since the teacher loves his native programming championship, he wants to find the minimum number of letters to replace in the sent string so that the substring "BSUIROPEN" (without captions) have met in the string as many times as possible. Help Vova to solve the problem.

Input

The first row consists of one natural number $$$n$$$ ($$$1 \leq 9 * n \leq 200\,000$$$). The following row contain string with length $$$9 * n$$$, consisting only from capital latin letters.

Output

In one string print integer number - answer to the problem.

Examples
Input
2
MKUKBSUIROPENKANDS
Output
17
Input
3
BSUIRLMEBBJUMSOPMEMNDIROPMC
Output
13