#include <bits/stdc++.h>

using namespace std;

void solve() {
    int n;
    cin >> n;
    string s;
    cin >> s;
    vector<int> dp(s.size() + 1);
    dp.back() = 1;
    int mask = 0;
    for (int i = s.size() - 1; i >= 0; --i) {
        mask |= (1 << (s[i] - 'a'));
        dp[i] = dp[i + 1];
        if (mask == (1 << n) - 1) {
            ++dp[i];
            mask = 0;
        }
    }
    cout << dp[0];
}

signed main() {
    int t = 1;
    //    cin >> t;
    while (t--) {
        solve();
    }
}
