#include using namespace std; char s[10010],t[10010]; int n,m,ans=1; int main(){ cin>>s>>t; n=s[strlen(s)-1]-'0'; if(strcmp(t,"0")==0){ cout<<1<