#include using namespace std; using ll=long long; constexpr ll mod=1e9+7; int main() { cin.tie(0); ios_base::sync_with_stdio(false); ll a,b,c,d; cin>>a>>b>>c>>d; if (a==c || b==d || abs(a-c) + abs(b-d) <= 3) { cout << 1; return 0; } cout << 2; }