aboutsummaryrefslogtreecommitdiff
path: root/StonesOnTheTable/main.cpp
blob: b7bf69ec07b896ff0dececb76801d0f5f6d398c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<bits/stdc++.h>

using namespace std;

int main () {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  map<char, int> mp;
  for(auto ch : s) {
    mp[ch]++;
  }
  int mx = 0;
  for(auto p : mp) {
    mx = max(p.second, mx);
  }
  cout << mx - 1 << endl;
}