#include using namespace std; int main() { int n, m; cin>>n>>m; cout<<(m>=n ? 1 : n%2 or m