#include <bits/stdc++.h>
using namespace std;
const long long inf = (1LL << 50);
int main(int argc, char const *argv[]) {
  int n;
  string s;
  cin >> n >> s;
  if (n > 26)
    cout << -1 << '\n';
  else {
    set<char> ss;
    for (int i = 0; i < n; i++) ss.insert(s[i]);
    cout << (n - int(ss.size())) << '\n';
  }
  return 0;
}
