#include <bits/stdc++.h>
using namespace std;
int n, dem[1007], kq;
string s;
int main() {
  cin >> n;
  cin >> s;
  if (s.length() > 26) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < n; ++i) ++dem[s[i]];
  for (int i = 'a'; i <= 'z'; ++i) {
    kq += max(0, dem[i] - 1);
  }
  cout << kq;
  return 0;
}
