#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  char s;
  int v[26] = {0};
  int counterZero = 0;
  int counter = 0;
  for (int i = 0; i < x; i++) {
    cin >> s;
    int j = s - 97;
    v[j]++;
  }
  for (int i = 0; i < 26; i++) {
    if (v[i] == 0) {
      counterZero++;
    } else if (v[i] > 1) {
      counter += (v[i] - 1);
    }
  }
  if (counter > 25 || counter > counterZero)
    cout << -1 << endl;
  else
    cout << counter << endl;
}
