#include <bits/stdc++.h>
using namespace std;
long long n, ans = 0;
string a;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  vector<int> v;
  vector<int> str;
  cin >> n >> a;
  for (long long i = 0; i < n; i++) {
    str.push_back(a[i]);
  }
  for (long long i = 0; i < n; i++) {
    if (count(v.begin(), v.end(), a[i]) < 1) {
      v.push_back(a[i]);
    }
  }
  for (long long i = 0; i < v.size(); i++) {
    if (count(str.begin(), str.end(), v[i]) > 1) {
      ans += (count(str.begin(), str.end(), v[i]) - 1);
    }
  }
  if (ans < 26 && n < 27) {
    cout << ans << "\n";
  } else {
    cout << -1 << "\n";
  }
}
