#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  set<char> s;
  char ch;
  int rep = 0;
  for (int i = 0; i < n; i++) {
    cin >> ch;
    if (s.find(ch) != s.end()) rep++;
    s.insert(ch);
  }
  if (26 - s.size() >= rep)
    cout << rep;
  else
    cout << "-1";
}
