#include <bits/stdc++.h>
using namespace std;
int main() {
std:
  ios::sync_with_stdio(false);
  int N;
  string S;
  cin >> N >> S;
  if (N > 26) {
    cout << "-1\n";
  } else {
    int A[26] = {0};
    for (int i = 0; i < N; i++) {
      int X = S[i] - 'a';
      A[X]++;
    }
    int cnt = 0;
    for (int i = 0; i < 26; i++) {
      if (A[i] > 1) cnt += A[i] - 1;
    }
    cout << cnt << endl;
  }
}
