#include <bits/stdc++.h>
using namespace std;
int freq[27];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) {
    int t = int(s[i] - 'a') + 1;
    freq[t]++;
  }
  int ans = 0;
  for (int i = 1; i <= 26; i++) {
    if (freq[i] > 1) ans += freq[i] - 1;
  }
  int flag = 0;
  for (int i = 1; i <= 26; i++) {
    if (freq[i] == 0) flag++;
  }
  if (ans > flag)
    cout << "-1" << '\n';
  else
    cout << ans << '\n';
  return 0;
}
