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