#include <bits/stdc++.h>
using namespace std;
string s;
int n, ans, a[1000];
int main() {
  cin >> n >> s;
  if (n > 26) {
    cout << -1;
    return 0;
  }
  for (int i = 0; i < n; ++i) a[s[i]]++;
  for (int i = 'a'; i <= 'z'; ++i)
    if (a[i] > 0) ans += a[i] - 1;
  cout << ans;
}
