#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 22;
const int INF = 1e9 + 2;
long long n, ans, mark[MAXN];
char str[MAXN];
int main() {
  cin >> n;
  cin >> str;
  for (int i = 0; i < n; i++) {
    if (mark[str[i]] == 0) {
      mark[str[i]] = 1;
      ans++;
    }
  }
  if (n > 26)
    cout << -1;
  else
    cout << n - ans;
  return 0;
}
