#include <iostream>
#include<string>
#include<iomanip>
using namespace std;

int main()
{
	long long n;
	string s;
	cin>>n>>s;
	if (n == 26 && s == "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
	{
		cout<<1;
		return 0;
	}
	if (n<=26)
	{
		cout<<0;
		return 0;
	}
	long long niz [26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
    for (int i = 0; i<n; i++)
	{
		
		string fragment= s.substr(i) ;
		if      (fragment == "A"){niz[0]++;}
		else if (fragment == "B"){niz[1]++;}
		else if (fragment == "C"){niz[2]++;}
		else if (fragment == "D"){niz[3]++;}
		else if (fragment == "E"){niz[4]++;}
		else if (fragment == "F"){niz[5]++;}
		else if (fragment == "G"){niz[6]++;}
		else if (fragment == "H"){niz[7]++;}
		else if (fragment == "I"){niz[8]++;}		
		else if (fragment == "J"){niz[9]++;}
		else if (fragment == "K"){niz[10]++;}
		else if (fragment == "L"){niz[11]++;}
		else if (fragment == "M"){niz[12]++;}
		else if (fragment == "N"){niz[13]++;}
		else if (fragment == "O"){niz[14]++;}
		else if (fragment == "P"){niz[15]++;}
		else if (fragment == "Q"){niz[16]++;}
		else if (fragment == "R"){niz[17]++;}
		else if (fragment == "S"){niz[18]++;}	
		else if (fragment == "T"){niz[19]++;}	
		else if (fragment == "U"){niz[20]++;}
		else if (fragment == "V"){niz[21]++;}
		else if (fragment == "W"){niz[22]++;}
		else if (fragment == "X"){niz[23]++;}
		else if (fragment == "Y"){niz[24]++;}
		else if (fragment == "Z"){niz[25]++;}
	
	}
	long long p = 1;
	
	for (int o=0; o<26; o++)
	{
		p *= niz[o];
		if (p==0)
		{
			cout<<0;
			return 0;
		}
	}

    
return 0;
	
	
}