#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:65000000")
using namespace std;
int n;
string s;
map<char, int> mp;
int main() {
  cin >> n;
  cin >> s;
  if (n > 26) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    mp[s[i]]++;
  }
  cout << n - mp.size();
  return 0;
}
