//#include //using namespace atcoder; #include using namespace std; typedef long long ll; #define REP(i, n) for(int i=0; i=0; i--) #define FOR(i, m, n) for(int i=m; i; using LP = pair; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 1e9; const ll LINF = (1LL<<60); template vector table(int n, T v) { return vector(n, v); } template auto table(int n, Args... args) { auto val = table(args...); return vector(n, move(val)); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll a,b,c,d; cin >> a >> b >> c >> d; if(a==c || b==d || abs(a-c)+abs(b-d)<=3) cout << 1 << endl; else cout << 2 << endl; return 0; }