#include <bits/stdc++.h>
using namespace std;

int main() {
    int a1, a2, a3, a4; cin >> a1 >> a2 >> a3 >> a4;
    int res = a1;
    if(res > a2) res = a2;
    if(res > a3) res = a3;
    if(res > a4) res = a4;
    cout << res;
    return 0;
}
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);

    double a,b,c,d; cin >> a >> b >> c >> d;
    d = - d;
    double A = (b - d) / (a - c);
    double B = b - A * a;
    cout.precision(17);
    cout << - B / A << endl;
}