#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using int32 = std::int_fast32_t; using int64 = std::int_fast64_t; using uint32 = std::uint_fast32_t; using uint64 = std::uint_fast64_t; int main(void) { std::ios::sync_with_stdio(false); std::cin.tie(0); int32 x, y; std::cin >> x >> y; int32 ans; if (x == y) { ans = 0; } else if (x == 0) { ans = 2; } else if (y == 0) { ans = 1; } else if (x + y == 0) { ans = 3; } else { ans = -1; } std::cout << ans << "\n"; return 0; }