#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  getchar();
  string S;
  cin >> S;
  int C[27];
  for (int i = 0; i < 26; i++) C[i] = 0;
  int Cn = 0;
  for (int i = 0; i < S.size(); i++) {
    if (!C[S[i] - 97]) {
      C[S[i] - 97] = 1;
    } else {
      Cn++;
    }
  }
  int Ch = 0;
  for (int i = 0; i <= 26; i++) {
    if (!C[i]) {
      Ch++;
    }
  }
  if (Cn > Ch) {
    cout << "-1" << endl;
    return 0;
  }
  cout << Cn << endl;
  return 0;
}
