#include<bits/stdc++.h>
using namespace std;
string s, x;
int main(){
    cin>>s>>x;
    if(s.size()<26){cout<<0<<endl;}
    else if(s.size()==26 and x=="ABCDEFGHIJKLMNOPQRSTUVWXYZ"){cout<<1<<endl;}
return 0;
}