#include <bits/stdc++.h>
using namespace std;
int ar[26];
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  char a;
  string s;
  cin >> s;
  int ans = 0, c = 0;
  for (int i = 0; i < n; ++i) {
    a = s[i];
    ar[a - 'a']++;
  }
  for (int i = 0; i < 26; ++i) {
    if (ar[i] > 1)
      c += (ar[i] - 1);
    else if (ar[i] == 0)
      ans++;
  }
  if (ans < c)
    cout << "-1";
  else
    cout << c;
  return 0;
}
