#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char string[n];
  cin >> string;
  int freq[266] = {0};
  int c = 0;
  for (int i = 0; i < n; i++) {
    freq[string[i]]++;
    if (freq[string[i]] >= 2) c++;
  }
  if (n > 26)
    cout << "-1\n";
  else
    cout << c << "\n";
  return 0;
}
