#include #include #include using namespace std; int main() { int x, y, x2, y2; cin >> x >> y >> x2 >> y2; int result = min(x, y) + abs(x - y); if (x == y && x2 == y2 && abs(x2) < abs(x)) { result += 2; } cout << result << endl; return 0; }