#include <bits/stdc++.h>
using namespace std;
set<char> mys;
int main() {
  int n;
  scanf("%d", &n);
  if (n > 26) {
    printf("-1\n");
    return 0;
  }
  char c;
  for (int i = 1; i <= n; i++) scanf(" %c", &c), mys.insert(c);
  printf("%d\n", n - (int)mys.size());
  return 0;
}
