#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n > 26) {
    cout << "-1";
    return 0;
  }
  int b[26] = {0};
  for (int i = 0; i < n; i++) {
    b[s[i] - 'a']++;
  }
  int sum = 0;
  for (int i = 0; i < 26; i++) {
    if (b[i] > 1) {
      sum += (b[i] - 1);
    }
  }
  cout << sum;
  return 0;
}
