#include <bits/stdc++.h>
using namespace std;
int aux[29] = {0};
int main() {
  int n, ans = 0;
  string s;
  cin >> n >> s;
  if (n > 26) {
    cout << "-1" << endl;
    return 0;
  } else {
    for (int i = 0; i < n; i++) aux[s[i] - 'a']++;
    for (int i = 0; i < 26; i++)
      if (aux[i]) ans += aux[i] - 1;
    cout << ans << endl;
  }
  return 0;
}
