#include <bits/stdc++.h>
using namespace std;
bool compare(unsigned long long int a, unsigned long long int b) {
  return a > b;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  unsigned long long int n;
  cin >> n;
  cin >> ws;
  string s;
  getline(cin, s);
  sort(s.begin(), s.end());
  unsigned long long int cont = 0;
  for (unsigned long long int j = 0; j < n; j++) {
    char t = s[j];
    j++;
    while (s[j] == t && j < n) {
      j++;
      cont++;
    }
    j--;
  }
  unsigned long long int uniqu = n - cont;
  unsigned long long int mid = n / 2;
  if (cont >= 26)
    cout << -1;
  else if ((uniqu + cont) > 26)
    cout << -1;
  else
    cout << cont;
}
