#include <bits/stdc++.h>

using namespace std;

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

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