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