#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  if ((int)s.size() > 26)
    cout << "-1\n";
  else {
    sort(s.begin(), s.end());
    int cnt = 0;
    for (int i = 0; i < (int)s.size() - 1; ++i)
      if (s[i] == s[i + 1]) ++cnt;
    cout << cnt << endl;
  }
  return 0;
}
