#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int maxn = 1e5 + 123;
const long long inff = 1e18;
int n, cnt;
string second;
set<string> st;
int main() {
  cin >> n;
  cin >> second;
  if (n > 26) {
    cout << -1;
    return 0;
  }
  sort(second.begin(), second.end());
  for (int i = 0; i < second.size(); ++i) {
    if (second[i] == second[i + 1]) cnt++;
  }
  cout << cnt;
  return 0;
}
