#include <bits/stdc++.h>
const int MAXN = 1e5 * 5;
const int INF = 1e9 + 7;
const int N = 5000;
using namespace std;
int n, ans, d[N];
char a[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  if (n > 26) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i)
    if (d[a[i]] == 0) {
      d[a[i]] = 1;
      ++ans;
    }
  cout << n - ans;
  return 0;
}
