#include <bits/stdc++.h>
using namespace std;
int n;
int cnt[2133];
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  char ch;
  int i, j;
  int ans = 0;
  for (i = 1; i <= n; i++) {
    cin >> ch;
    cnt[int(ch)] += 1;
  }
  int e = 0;
  for (i = int('a'); i <= int('z'); i++) {
    if (cnt[i] > 0) {
      ans += cnt[i] - 1;
    } else {
      e++;
    }
  }
  if (ans > e) {
    cout << -1;
  } else
    cout << ans;
  return 0;
}
