#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  int n;
  cin >> n >> str;
  vector<int> A(26, 0);
  vector<int> B(26, 0);
  for (int i = 0; i < n; i++) {
    A[str[i] - 'a']++;
    B[str[i] - 'a'] = 1;
  }
  int c = 0;
  for (int i = 0; i < 26; i++) {
    if (A[i] > 1) {
      int p = A[i] - 1;
      for (int j = 0; j < 26 && p > 0; j++) {
        if (B[j] == 0) {
          p--;
          B[j] = 1;
        }
      }
      if (p == 0)
        c += (A[i] - 1);
      else {
        c = -1;
        break;
      }
    }
  }
  printf("%d\n", c);
}
