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.
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.
In one string print integer number - answer to the problem.
2 MKUKBSUIROPENKANDS
17
3 BSUIRLMEBBJUMSOPMEMNDIROPMC
13