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