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