#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <bitset>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <string>
#include <chrono>
#include <random>
#include <cmath>
#include <cassert>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <sstream>

using namespace std;


int main(int argc, char** argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(12);

    int a, b, c;
    cin >> a >> b >> c;

    int n = 100;
    vector<vector<vector<double>>> dp(n + 1, vector<vector<double>>(n + 1, vector<double>(n + 1, 0)));
    dp[a][b][c] = 1;

    for (int i = a; i < n; ++i) {
        for (int j = b; j < n; ++j) {
            for (int k = c; k < n; ++k) {
                if (dp[i][j][k] > 0) {
                    double p = dp[i][j][k];
                    int m = i + j + k;
                    dp[i + 1][j][k] += p * i / m;;
                    dp[i][j + 1][k] += p * j / m;
                    dp[i][j][k + 1] += p * k / m;
                }
            }
        }
    }

    double res = 0;
    for (int i = 0; i <= n; ++i) {
        for (int j = 0; j <= n; ++j) {
            for (int k = 0; k <= n; ++k) {
                if (i == n || j == n || k == n) {
                    res += (i + j + k - a - b - c) * dp[i][j][k];
                }
            }
        }
    }

    cout << res << '\n';

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long r1,c1,r2,c2;

int main() {
	cin>>r1>>c1>>r2>>c2;
	if (r1==r2&&c1==c2)
		cout<<0;
	else if (r1+c1==r2+c2||
	r1-c1==r2-c2||
	abs(r1-r2)+abs(c1-c2)<=3) {
		cout<<1;
	}
	else if ((r1+c1)%2==(r2+c2)%2)
		cout<<2;
	else {
		int r=r1,c=c1;
		for (r1=r-3; r1<=r+3; ++r1)
			for (c1=c-3; c1<=c+3; ++c1)
				if (abs(r1-r)+abs(c1-c)<=3&&(
				r1+c1==r2+c2||r1-c1==r2-c2||
				abs(r1-r2)+abs(c1-c2)<=3)) {
					cout<<2;
					return 0;
				}
		cout<<3;
	}
}