#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string a;
  cin >> a;
  if (a.size() > 26) {
    cout << "-1\n";
  } else {
    int count = 0;
    int hash[26] = {0};
    for (int i = 0; i < a.size(); i++) {
      if (hash[a[i] - 97])
        count++;
      else
        hash[a[i] - 97]++;
    }
    cout << count << "\n";
  }
}
