#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  string s;
  cin >> s;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    mp[s[i]]++;
  }
  int total = 0, can = 0;
  for (int i = 'a'; i <= 'z'; ++i) {
    if (mp[i]) {
      total += mp[i] - 1;
    } else {
      can++;
    }
  }
  if (total > can)
    cout << -1;
  else
    cout << total;
  return 0;
}
