#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int main() {
  int n;
  string s;
  cin >> n >> s;
  if (n > 26)
    cout << "-1" << endl;
  else {
    cout << n - set<char>(begin(s), end(s)).size() << endl;
  }
}
