/*
#include<stdio.h>
int main(){
printf("Hello");
return 0;
}
*//*
#include<stdio.h>
int main(){
printf("Hello World");
return 0;
}*/
/*#include<stdio.h>
int main(){
printf("Hello\nWorld");}
*/
/*#include<stdio.h>
int main(){printf("\'Hello\'");}
*/
/*#include<stdio.h>
int main(){printf("\"Hello World\"");}*/
/*#include<stdio.h>
int main()
{
printf("\"!@#$%^&*()\"");
return 0;
}*/
/*#include<stdio.h>
int main(){
printf("\"C:\\Download\\hello.cpp\"");
return 0;}
*/
/*#include<stdio.h>
int main()
char b;
scanf("%c",&b);
printf("%c",b);
return 0;
*/
/*#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
printf("%d",n);
return 0;
}
*/
/*#include<stdio.h>
int main()
{
char x;
scanf("%c",&x);
printf("%c",x);
return 0;
}*/
/*#include<stdio.h>
int main()
{
float x;
scanf("%f",&x);
printf("%f",x);
}*/
/*#include<stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d %d",a,b);
return 0;
*/
/*#include<stdio.h>
int main()
{
char x,y;
scanf("%c %c",&x,&y);
printf("%c %c",y,x);
return 0;
}*/
/*#include<stdio.h>
int main(){
int a;
scanf("%d",&a);
printf("%d %d %d",a,a,a);
return 0;
}
*/
/*#include<stdio.h>
int main()
{
long long int n,a;
scanf("%lld %lld",&n,&a);
printf("%lld",n+a);
return 0;
}*/
/*#include<stdio.h>
int main(){
long long int n,a;
scanf("%lld %lld",&n,&a);
printf("%lld",n+a);
return 0;
}*/
/*#include<stdio.h>
int main()
{
long long int n;
scanf("%lld",&n);
printf("%lld",-n);
return 0;
}
*/
/*#include<stdio.h>
int main(){
char x;
scanf("%c",&x);
printf("%c",x+1);
return 0;
}*/
/*#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a/b);
return 0;
}*/
/*clude<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a%b);
return 0;
}*/
/*#include<stdio.h>
int main()
{
long long int a;
scanf("%lld",&a);
printf("%lld",a+1);
return 0;
}*/
/*#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a>b);
return 0;
}*/
/*#include<stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a==b);
return 0;
}*/
/*#include<stdio.h>
int main(){
int a;
scanf("%d",&a);
printf("%d",!a);
return 0;
}*/
/*#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a&&b);
return 0;
}*/
/*#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",a||b);
return 0;
}*/
#include<stdio.h>
int main(){
int a,b;
scanf("%d %d",&a,&b);
printf("%d",(a&&!b)||(!a&&b));
return 0;
}