#include <bits/stdc++.h>
using namespace std;
int n;
bool alpha[26];
int ans = 0;
int t = 0;
int main() {
  cin >> n;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (alpha[s[i] - 'a'] == 1) {
      ans++;
    } else {
      alpha[s[i] - 'a'] = 1;
      t++;
    }
  }
  if (ans > 25 || 26 - t < ans) {
    cout << -1;
    exit(0);
  }
  cout << ans;
}
