#include <bits/stdc++.h>
using namespace std;
int n, ans = 0, vis[30];
int main() {
  cin >> n;
  if (n > 26) return cout << -1, 0;
  for (int i = 0; i < n; ++i) {
    char c;
    cin >> c;
    if (!vis[c - 'a'])
      vis[c - 'a'] = 1;
    else
      ans++;
  }
  cout << ans;
  return 0;
}
