#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, max1 = 0, n, p, sum = 0;
  string a, b, c;
  cin >> n;
  int x[26] = {0};
  cin >> a;
  if (n > 26)
    cout << "-1" << endl;
  else {
    for (i = 0; i < n; i++) {
      p = a[i] - 'a';
      x[p]++;
    }
    for (i = 0; i < 26; i++) {
      if (x[i] > 1) {
        sum += (x[i] - 1);
        if (x[i] > max1) max1 = x[i];
      }
    }
    cout << sum << endl;
  }
  return 0;
}
