#include <bits/stdc++.h>
using namespace std;
int c[33];
string s;
int main() {
  int n;
  cin >> n;
  cin >> s;
  for (int i = 0; i < s.length(); i++) c[s[i] - 'a']++;
  int ans = 0;
  if (s.length() > 26)
    cout << -1 << endl;
  else {
    for (int i = 0; i < 26; i++)
      if (c[i]) ans++;
    cout << s.length() - ans << endl;
  }
  return 0;
}
