#include <bits/stdc++.h>
using namespace std;
map<char, int> seen;
int main() {
  int n, res = 0;
  char ch;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ch;
    if (seen[ch] != 0) res++;
    seen[ch]++;
  }
  if (res > 25)
    cout << -1;
  else {
    int ans = n - res;
    if (ans > (26 - res))
      cout << -1;
    else
      cout << res;
  }
  return 0;
}
