#include <bits/stdc++.h>


using namespace std;


int main()
{
    int n;
    cin >> n;
    string s;
    cin >> s;
    if(n<26){
        cout << "0" << endl;
        return 0;
    }
    if(n==26){
    if(s=="ABCDEFGHIJKLMNOPQRSTUVWXYZ"){
        cout << "1" << endl;
        return 0;
    }
    else{
        cout << "0" << endl;
        return 0;
    }
    }
    if(n==27){
        string k = s;
        for(int i=0;i<27;i++){
            s.erase(i,1);
            if(s=="ABCDEFGHIJKLMNOPQRSTUVWXYZ"){
                cout << "1" << endl;
                return 0;
            }
            s = k;
        }
        cout << "0" << endl;
        return 0;
    }

    return 0;
}