#include <bits/stdc++.h>
using namespace std;
string s;
int w[26];
int main() {
  for (int i = 0; i < 26; i++) w[i] = 0;
  int n;
  scanf("%d", &n);
  cin >> s;
  for (int i = 0; i < n; i++) {
    w[s[i] - 'a']++;
  }
  int ans = 0, f = 26, r = 0;
  for (int i = 0; i < 26; i++) {
    if (w[i] != 0) f--;
    if (w[i] > 1) r += w[i] - 1;
  }
  if (f < r) {
    printf("-1");
  } else {
    for (int i = 0; i < 26; i++) {
      if (w[i] == 0) continue;
      ans += w[i] - 1;
    }
    printf("%d", ans);
  }
  return 0;
}
