#include <bits/stdc++.h>
using namespace std;
const long long lINF = 1000000000000000000;
const int INF = 1000000000;
int main() {
  iostream::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (n > 26) {
    cout << -1;
    return 0;
  }
  bool used[26] = {};
  int ans = 0;
  for (auto(i) = (0); (i) < (n); (i)++) {
    if (used[s[i] - 'a']) ans++;
    used[s[i] - 'a'] = 1;
  }
  cout << ans;
  return 0;
}
