#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n > 26) {
    cout << -1 << endl;
  } else {
    set<char> sc(s.begin(), s.end());
    cout << n - sc.size() << endl;
  }
  exit(0);
}
