#include using namespace std; #define ll long long int main() { ll gx, gy; cin >> gx >> gy; int ans = 2; if (gx == gy || -gx == gy) { ans = 1; } if (gx == 0 || gy == 0) { ans = 1; } if (gx == 0 && gy == 0) { ans = 0; } cout << ans << endl; return 0; }