#pragma region Region_1

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
using ll = long long;
using P = pair<int, int>;
using VI = vector<int>;
using VVI = vector<VI>;
using VL = vector<ll>;
using VVL = vector<VL>;
using VP = vector<P>;
using VS = vector<string>;
using VC = vector<char>;
#define MOD 1000000007
const int INF = 1e9 + 10;

template <class T, class C>
bool chmax(T& a, C b) { if (a <= b) { a = b; return true; } return false; }
template <class T, class C>
bool chmin(T& a, C b) { if (a >= b) { a = b; return true; } return false; }


template <class T> T sum(const vector<T>& v) {
    T res = 0;
    for (size_t i = 0; i < v.size(); ++i) res += v[i];
    return res;
}

/////////////////////////////////////////////////////////
// print like python
// https://qiita.com/Lily0727K/items/06cb1d6da8a436369eed
/////////////////////////////////////////////////////////
void print() { cout << endl; }

template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) {
    cout << head;
    if (sizeof...(tail) != 0) cout << " ";
    print(forward<Tail>(tail)...);
}

template <class T> void print(vector<T>& vec) {
    for (auto& a : vec) {
        cout << a;
        if (&a != &vec.back()) cout << " ";
    }
    cout << endl;
}

template <class T> void print(vector<vector<T>>& df) {
    for (auto& vec : df) {
        print(vec);
    }
}

#pragma endregion Region_1
/////////////////////////////////////////////////////////

int main() {
    //入力の高速化用のコード
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    std::cout << std::setprecision(15);
    //////////////////////////////////////////
    double sx,sy,gx,gy;
    cin >> sx >> sy >> gx >> gy;
    print((sy*gx+gy*sx)/(gy+sy));
    

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main() {
    int r1, c1, r2, c2;
    cin >> r1 >> c1 >> r2 >> c2;
    int answer;

    int dr = r2 - r1;
    int dc = c2 - c1;

    if (dr == 0 && dc == 0) {
        answer = 0;
    } else if (dr == -dc || dr == dc || abs(dr) + abs(dc) <= 3 ) {
        answer = 1;
    } else if ((dr + dc) % 2 == 0 || abs(dr + dc) <= 3 || abs(dr - dc)<= 3 || abs(dr) + abs(dc) <= 6) {
        answer = 2;
    } else {
        answer = 3;
    }

    cout << answer << endl;

}
