#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3F3F3F3F;
const int NEGINF = 0xC0C0C0C0;
const double EPS = 1e-8;
int cmp_double(double a, double b, double eps = 1e-9) {
  return a + eps > b ? b + eps > a ? 0 : 1 : -1;
}
inline void scanint(int& x) {
  register int c = getchar();
  x = 0;
  int neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x << 1) + (x << 3) + c - 48;
  }
  if (neg) x = -x;
}
int conta(int v, string& s, vector<int>& mark) {
  int tam = s.size();
  int cnt = 0;
  if (v == 0) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'Z') cnt++;
    }
  } else if (v == 2) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'W') cnt++;
    }
  } else if (v == 4) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'U') cnt++;
    }
  } else if (v == 6) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'X') cnt++;
    }
  } else if (v == 1) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'O') cnt++;
    }
  } else if (v == 3) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'R') cnt++;
    }
  } else if (v == 8) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'H') cnt++;
    }
  } else if (v == 7) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'S') cnt++;
    }
  } else if (v == 5) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'F') cnt++;
    }
  } else if (v == 9) {
    for (int i = 0; i < tam; i++) {
      if (mark[i]) continue;
      if (s[i] == 'I') cnt++;
    }
  }
  return cnt;
}
void del_aux(string& s, int cnt, string& aux, vector<int>& mark, int tam) {
  map<char, int> m;
  for (auto& x : aux) m[x] = cnt;
  for (int i = 0; i < tam; i++) {
    if (mark[i]) continue;
    if (m[s[i]] != 0) {
      mark[i] = 1;
      m[s[i]]--;
    }
  }
}
int deleta(int v, string& s, vector<int>& mark, int cnt) {
  int tam = s.size();
  string aux = "";
  if (v == 0) {
    aux = "ZERO";
  } else if (v == 2) {
    aux = "TWO";
  } else if (v == 4) {
    aux = "FOUR";
  } else if (v == 6) {
    aux = "SIX";
  } else if (v == 1) {
    aux = "ONE";
  } else if (v == 3) {
    aux = "THREE";
  } else if (v == 8) {
    aux = "EIGHT";
  } else if (v == 7) {
    aux = "SEVEN";
  } else if (v == 5) {
    aux = "FIVE";
  } else if (v == 9) {
    aux = "NINE";
  }
  del_aux(s, cnt, aux, mark, tam);
}
string to_string2(int n) {
  string ans = "";
  while (n != 0) {
    int c = n % 10;
    ans += (char)(c + '0');
    n = n / 10;
  }
  reverse(ans.begin(), ans.end());
  return ans;
}
char new_char(map<char, bool>& m) {
  for (int i = 0; i < 33; i++) {
    char c = i + 'a';
    if (c > 'z') break;
    if (m.find(c) == m.end()) return c;
  }
  return '0';
}
int main() {
  int N;
  cin >> N;
  string s;
  cin >> s;
  map<char, int> m;
  if (N >= 27) {
    cout << "-1" << endl;
    return 0;
  }
  int ans = 0;
  int uniq = 0;
  for (auto& x : s) m[x]++;
  for (auto& x : m) {
    ans += x.second - 1;
    uniq++;
  }
  int can = 26 - uniq;
  if (ans > can) {
    cout << "-1" << endl;
    return 0;
  }
  cout << ans << endl;
  return 0;
  return 0;
}
