#include using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); ll n, K; cin >> n >> K; assert(n % 2 == 1 || K % 2 == 1); if (n == K) cout << 1 << endl; else cout << 0 << endl; return 0; }