#include #include #include #include using namespace std; int main() { long long x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2; if(abs(x1) == abs(y1) && abs(x2) == abs(y2) && abs(x1) > abs(x2) && x1*y2 - x2*y1 == 0) { cout << max(x1, y1) + 1 << endl; } else { cout << max(x1, y1) << endl; } }