#include <bits/stdc++.h>
using namespace std;
const int Max = 100000;
void input(int &n, string &s);
void difference(int n, string s, int &answer);
void output(int answer, int n);
int main() {
  string s;
  int n, answer;
  input(n, s);
  difference(n, s, answer);
  output(answer, n);
  return 0;
}
void input(int &n, string &s) {
  cin >> n;
  cin >> s;
}
void difference(int n, string s, int &answer) {
  int l[500] = {0};
  answer = 0;
  for (int i = 0; i < n; i++) {
    answer += (l[s[i]]++) == 0;
  }
}
void output(int answer, int n) {
  if (n > 26)
    cout << -1 << endl;
  else
    cout << n - answer << endl;
}
