Niko Loves NSU

DiscoFighter47 Intra NSU Programming Con...
Limits 1s, 512 MB

I don't know about you but Niko loves NSU life so much. He always tries to show off that he is an NSUer. One day he found some wood letter cutouts lying on the plaza area. Niko was thinking about how many times he can produce “NSU” using those cutouts.

Input

The first line contains an integer N (1 ≤ N ≤ 1000) which denotes the number of letters found by Niko. The second line contains a text of N characters. All those cutouts are upper case English alphabets.

Output

Print the number of times “NSU” can be produced out of those cutouts.

Samples

InputOutput
12
NIKOLOVESNSU
1
InputOutput
9
NSUUSNSUN
3
InputOutput
10
ABCDEFGHIJ
0

Submit

Login to submit.

Statistics

95% Solution Ratio
shadman.taqiEarliest, Apr '20
shadman.taqiFastest, 0.0s
shadman.taqiLightest, 0 B
WhiteCiferShortest, 44B
Toph uses cookies. By continuing you agree to our Cookie Policy.