#include <bits/stdc++.h>
using namespace std;
bool alphabets[26] = {0};
int main(int argc, char *argv[]) {
  long int n;
  cin >> n;
  if (n > 26) {
    cout << -1 << endl;
    return 0;
  }
  string s;
  cin >> s;
  int count = 0;
  for (int i = 0; i < s.length(); i++) {
    if (alphabets[s[i] - 65])
      count += 1;
    else
      alphabets[s[i] - 65] = 1;
  }
  cout << count << endl;
  return 0;
}
