#include <bits/stdc++.h>
const long long int N = 2e5 + 10;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n;
  cin >> n;
  string second;
  cin >> second;
  set<char> x;
  if (n > 26) {
    cout << -1 << endl;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    x.insert(second[i]);
  }
  cout << n - x.size() << endl;
}
