#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, flag = 0, ans = 0;
  cin >> n;
  string s;
  cin >> s;
  if (n > 26)
    cout << -1;
  else {
    for (int i = 0; i < n - 1; i++) {
      flag = 0;
      for (int j = i + 1; j < n && flag == 0; j++) {
        if (s[i] == s[j] && flag == 0) {
          ans++;
          flag++;
        }
      }
    }
    cout << ans << endl;
  }
}
