#include <bits/stdc++.h>
using namespace std;
char ar;
int a[300], sum;
int n;
int main() {
  cin >> n;
  if (n > 26) {
    cout << "-1" << endl;
    return 0;
  }
  memset(a, 0, sizeof(a));
  sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> ar;
    if (a[ar - '0'] != 0) sum++;
    a[ar - '0']++;
  }
  cout << sum << endl;
  return 0;
}
