#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, current = 0, newChar = 0;
  char c;
  cin >> n;
  vector<bool> vis(130, 0);
  for (unsigned i = (1); i <= (n); i++) {
    cin >> c;
    int w = (int)c;
    if (!vis[w]) {
      vis[w] = 1;
      current++;
    } else {
      newChar++;
    }
  }
  if (current + newChar > 26) {
    cout << -1;
  } else {
    cout << newChar;
  }
}
