#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, u = "";
  int n, d = 0;
  vector<char> v;
  cin >> n;
  cin >> s;
  if (n > 26) {
    cout << -1 << endl;
  } else {
    for (int i = 0; i < n; i++) {
      v.push_back(s[i]);
    }
    sort(v.begin(), v.end());
    for (int i = 0; i < v.size(); i++) {
      if (i + 1 < v.size()) {
        if (v[i] == v[i + 1]) {
          d++;
        }
      }
    }
    cout << d << endl;
  }
}
