#include <bits/stdc++.h>
using namespace std;
int main() {
  set<char> s;
  int n;
  cin >> n;
  string s1;
  cin >> s1;
  if (n > 26) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < s1.size(); i++) {
    s.insert(s1[i]);
  }
  cout << s1.size() - s.size();
}
