C. String Value
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Given a string $$$S$$$ of length $$$N$$$, find the length of the longest substring$$$^\dagger$$$ $$$R$$$ such that: $$$$$$\sum_{c=\texttt{'a'}}^{\texttt{'z'}} freq[c] \cdot C \ge |R| \cdot max(R)$$$$$$

Where:

  • $$$freq[c]$$$ is the frequency of the character $$$c$$$ in the substring $$$R$$$.

  • $$$C$$$ is the value of the character $$$c$$$ (the letter 'a' has a value of $$$1$$$, the letter 'b' has a value of $$$2$$$, and so on).

  • $$$|R|$$$ is the length of the substring $$$R$$$.

  • $$$max(R)$$$ is the greatest value of a character in the substring $$$R$$$.

$$$\dagger$$$  Substring: obtained by deleting several (possibly zero) characters from the start of the string and several (possibly zero) characters from the end of the string.

Input

The first line of the input contains a single integer $$$N$$$ ($$$1 \le N \le 10^5$$$) — the length of the string $$$S$$$.

The second line of the input contains a string $$$S$$$ of length $$$N$$$, consisting of lowercase English letters.

Output

Output one line containing a single integer — the length of the longest substring that satisfies the condition.

Examples
Input
4
abcd
Output
1
Input
3
bba
Output
2