#include <bits/stdc++.h>
using namespace std;
long long mark[100005];
int main() {
  int n, i, c = 0, d = 0;
  cin >> n;
  string s;
  cin >> s;
  for (i = 0; i < n; i++) {
    mark[s[i]]++;
    if (mark[s[i]] == 1) c++;
  }
  if (n - c < 26 && n <= 26)
    cout << n - c;
  else
    cout << -1;
}
