#include <bits/stdc++.h>
using namespace std;
pair<long, long> p[26];
long n, sum = 0, i, maxi = 0;
char s[100005];
int main() {
  for (i = 0; i < 26; i++) {
    p[i] = make_pair(i, 0);
  }
  cin >> n;
  cin >> s;
  for (i = 0; i < n; i++) {
    ++p[s[i] - 97].second;
  }
  for (i = 0; i < 26; i++) {
    if (p[i].second > 1) sum += (p[i].second - 1);
    if (p[i].second == 0) maxi++;
  }
  if (sum > maxi)
    cout << "-1";
  else
    cout << sum;
  return 0;
}
