#include <bits/stdc++.h>
using namespace std;
int main() {
  double sum = 0;
  int w;
  cin >> w;
  string s;
  cin >> s;
  map<char, int> mp;
  for (char c : s) mp[c]++;
  int ans = 0;
  for (auto x : mp) {
    ans = max(ans, x.second);
  }
  cout << ans << endl;
  return 0;
}
