#include #define ll long long using namespace std; int main() { ll x,y; cin >> x >> y; if(x == 0 && y == 0) { cout << 0 << endl; return 0; } ll ans = 0; if(x != 0)ans++; if(y != 0)ans++; if(x == y || x == -y) cout << 1 << endl; else cout << ans << endl; return 0; }