#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
bool is_prime(int n) {
  if (n == 1) return false;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int modpow(int x, int n, int m) {
  if (n == 0) return 1 % m;
  long long u = modpow(x, n / 2, m);
  u = (u * u) % m;
  if (n % 2 == 1) u = (u * x) % m;
  return u;
}
int power_floor(int x) {
  int p = 1;
  while (x >>= 1) p <<= 1;
  return p;
}
int countDigit(long long n) {
  int count = 0;
  while (n != 0) {
    n = n / 10;
    ++count;
  }
  return count;
}
void printvector(vector<int> v) {
  for (auto s : v) {
    ;
  }
}
const long long mod = 1e9 + 7;
void solve() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  map<char, int> mp;
  for (int i = 0; i < n; ++i) {
    mp[s[i]]++;
  }
  int ct = 0;
  int sm = 0;
  for (auto s : mp) {
    if (s.second > 1) {
      ct++;
      sm += s.second;
    }
  }
  if ((sm - ct) % 2 == 0 || sm % 2 == 0) {
    cout << sm - ct << "\n";
  } else {
    cout << -1 << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long n, i, j, m, ans, s, p, r;
  string a;
  cin >> n >> a;
  map<char, long long> A;
  for (i = 0; i < n; i++) A[a[i]]++;
  p = 0;
  ans = 0;
  for (i = 'a'; i <= 'z'; i++) {
    p += max(p - p, A[char(i)] - 1);
    if (A[char(i)] == 0) ans++;
  }
  if (ans < p)
    cout << "-1" << endl;
  else
    cout << p << endl;
}
