#include <iostream>

using namespace std;
int main()
{
    string abcd,st;
    abcd="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int n;
    cin>>n;
    cin>>st;
    if(n<=26)
    {
        if (st==abcd)
            cout<<1;
        else
            cout<<0;
    }

}