#include <bits/stdc++.h>
using namespace std;
int alph[26];
int main() {
  int a, res = 0, ord = 0, num = 0;
  cin >> a;
  for (int i = 0; i < a; i++) {
    char c;
    cin >> c;
    alph[c - 'a']++;
  }
  for (int i = 0; i < 26; i++) {
    if (alph[i] > 1) ord += (alph[i] - 1);
  }
  if (a > 26)
    cout << -1 << endl;
  else
    cout << ord << endl;
  return 0;
}
