#include<bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define ll long long
#define N (int)(1e5+10)
#define mod 1000000007
#define mp make_pair
#define pb push_back
#define nd second
#define st first
#define inf mod
#define endl '\n'
#define sag (sol|1)
#define sol (root<<1)
#define ort ((bas+son)>>1)
#define bit(x,y) ((x>>y)&1)
int main(){
int H[500]={0};
int t=0,i,n;
char str[N];
cin >> n;
scanf("%s",str);
for(i=0 ; i<n ; i++)
t += (H[str[i]]++) == 0;
if(n > 26)
puts("-1");
else
cout << n - t << endl;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgojZGVmaW5lIHBpaSBwYWlyPGludCxpbnQ+CiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgTiAoaW50KSgxZTUrMTApCiNkZWZpbmUgbW9kIDEwMDAwMDAwMDcKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2RlZmluZSBwYiBwdXNoX2JhY2sKI2RlZmluZSBuZCBzZWNvbmQKI2RlZmluZSBzdCBmaXJzdAojZGVmaW5lIGluZiBtb2QKI2RlZmluZSBlbmRsICdcbicKI2RlZmluZSBzYWcgKHNvbHwxKQojZGVmaW5lIHNvbCAocm9vdDw8MSkKI2RlZmluZSBvcnQgKChiYXMrc29uKT4+MSkKI2RlZmluZSBiaXQoeCx5KSAoKHg+PnkpJjEpCgppbnQgbWFpbigpewoJaW50IEhbNTAwXT17MH07CglpbnQgdD0wLGksbjsKCWNoYXIgc3RyW05dOwoKCWNpbiA+PiBuOwoKCXNjYW5mKCIlcyIsc3RyKTsKCglmb3IoaT0wIDsgaTxuIDsgaSsrKQoJCXQgKz0gKEhbc3RyW2ldXSsrKSA9PSAwOwoKCWlmKG4gPiAyNikKCQlwdXRzKCItMSIpOwoJZWxzZQoJCWNvdXQgPDwgbiAtIHQgPDwgZW5kbDsKfQo=