#include <bits/stdc++.h>
using namespace std;
ifstream in;
ofstream out;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  map<char, int> b;
  int co = 26;
  int cn = 0;
  for (int i = 0; i < n; i++) {
    b[s[i]]++;
    if (b[s[i]] == 1) co--;
    if (b[s[i]] > 1) cn++;
  }
  if (co >= cn)
    cout << cn;
  else
    cout << "-1";
  return 0;
}
