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