/** * author: shu8Cream * created: 01.03.2021 17:39:04 **/ #include using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair; using vi = vector; using vvi = vector; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll a,b,c,d; cin >> a >> b >> c >> d; c-=a; d-=b; int ans = 0; if(abs(c)+abs(d)<=3) ans=1; else if(c==0 || d==0) ans=1; else ans=2; cout << ans << endl; }