#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, cnt = 1;
  cin >> n;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  if (n > 26) {
    cout << -1 << endl;
  } else {
    for (i = 0; i < n - 1; i++) {
      if (s[i] != s[i + 1]) {
        cnt++;
      }
    }
    cout << n - cnt << endl;
  }
  return 0;
}
