#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, c = 0, d = 0;
  cin >> n;
  string s;
  cin >> s;
  vector<int> arr(26);
  for (int i = n - 1; i >= 0; i--) {
    arr[(s[i] - '0' - 49)]++;
  }
  for (int i = 0; i < arr.size(); i++) {
    if (arr[i] == 0) {
      c++;
    } else if (arr[i] > 1) {
      d += arr[i] - 1;
    }
  }
  if (d > c) {
    cout << -1;
  } else {
    cout << d;
  }
  return 0;
}
