#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int64_t a, b, c, d; cin >> a >> b >> c >> d; int32_t ans; if (a == c || b == d || (abs(a - c) + abs(b - d) <= 3)) ans = 1; else ans = 2; cout << ans << endl; return 0; }