Under construction

Still being built. Things may change

UOSPC Count

Interview

Time limit1sMemory limit1024 MB

Summary
Rearrange the letters of S to form as many copies of uospc as possible, and print that maximum count.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

A fox that lives on Baebong Mountain likes playing with strings. Among all shapes, the fox likes uospc the most! The fox wants to rearrange the characters of its string so that it can form as many uospc shapes as possible. For example, rearranging 'suspicion' gives uospcsiin, and rearranging 'processyourpurchase' gives uospcuospcreyrrhase.

Given a string SS of lowercase English letters, find the maximum number of uospc that a clever fox can obtain by rearranging the characters of SS.

Input

The first line contains an integer nn, the length of the string (1≤n≤1 0001\leq n \leq 1\ 000).

The second line contains the string SS of length nn, consisting only of lowercase English letters.

Output

Print the maximum number of uospc that can be formed by rearranging the characters of SS.

Examples2

  1. Example 1

    Input
    9
    suspicion
    
    Expected output
    1
    
  2. Example 2

    Input
    19
    processyourpurchase
    
    Expected output
    2