#include <bits/stdc++.h>

#define fi first
#define se second
#define ll long long
#define dl double

using namespace std;

const int N = 2e6 + 7;
const long long mod = 1e9 + 7;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int n,m,k;

ll bnp(ll x, ll y)
{
        if(y == 0)return 1ll;
        if(y % 2){
                return x * bnp(x, y - 1) % mod;
        }else{
                ll b = bnp(x, y / 2);
                return b * b % mod;
        }
}

ll f[N];

ll C(ll n, ll k)
{
        if(k > n)return 0ll;
        return f[n] * bnp(f[n - k] * f[k] % mod, mod - 2) % mod;
}

void solve()
{
        f[0] = 1;
        for(int i = 1; i < N; i++)f[i] = f[i - 1] * i % mod;
        cin >> n >> m >> k;
        if(n > m + k){
                cout << 0;
                return;
        }
        cout << (C(n + m, n) - C(n + m, n - k - 1) + mod) % mod;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen( "input.txt" , "r" , stdin );
    //freopen( "output.txt" , "w" , stdout );

    int t = 1;
    //cin >> t;
    while(t--){
        solve();
    }
}

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <iomanip>
#include <queue>
#include <deque>
#include <map>
#include <unordered_map>
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define repr(e,x) for(auto& e:x)
using namespace std;
typedef long long ll;
typedef long double ld;
//typedef pair<int,int> P;
double const PI=3.141592653589793;
int const INF=1001001001;
ll const LINF=1001001001001001001;
ll const MOD=1000000007;

int a,b,c,d;

int main(){
    cin>>a>>b>>c>>d;

    int ans;
    if(a==c && b==d) ans=0;
    else if(a+b==c+d) ans=1;
    else if(a-b==c-d) ans=1;
    else if(abs(a-c)+abs(b-d)<=3) ans=1;
    else if((a+b+c+d)%2==0) ans=2;
    else if(abs(a-c)+abs(b-d)<=6) ans=2;
    else if(abs((a+b)-(c+d))<=3) ans=2;
    else if(abs((a-b)-(c-d))<=3) ans=2;
    else ans=3;

    cout<<ans<<endl;
    
    return 0;
}