#include<iostream> using namespace std; int main(){ int Chinese,maths; cin>>Chinese>>maths; cout<<(Chinese<60^maths<60); return 0; }