#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  if (n > 26) {
    cout << "-1\n";
    return;
  }
  int arr[26] = {0}, ans = 0;
  for (int i = 0; i < n; i++) {
    if (!arr[s[i] - 'a'])
      arr[s[i] - 'a']++;
    else
      ans++;
  }
  cout << ans << "\n";
}
int main() {
  solve();
  return 0;
}
