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