/*#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
*/
/*#include<stdio.h>
int main()
{
double a,b;
scanf("%lf %lf", &a, &b);
printf("%.2lf",a*b);
return 0;
}
*/
/*#include<stdio.h>
int main()
{
double a, b;
scanf("%lf %lf",&a, &b);
printf("%.1lf", (a*b)/2);
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 %d",a/60, a%60);
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;
}



