#include<bits/stdc++.h>

#define Rushia_mywife ios::sync_with_stdio(0);cin.tie(0);
#define rep0(n) rep(i,0,n)
#define rep1(n) rep(i,1,n+1)
#define rep(i,head,n) for(int i=(head);i<n;i++)
#define F first
#define S second
#define FF first.first
#define FS first.second
#define SF second.first
#define SS second.second
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define all(x) (x).begin(),(x).end()
#define mem(x,i) memset((x),(i),sizeof((x)))

using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<long long,long long>;
using ld = long double;

const int mod = 1000000007;
const int hnum = 998244353;
const ld PI = acos(-1);

#define Bint __int128
#define int long long
int qpow(int x,int powcnt,int tomod){
	int res = 1;
	for(;powcnt;powcnt>>=1,x=(x*x)%tomod)
		if(1&powcnt)res = (res*x)%tomod;
	return (res%tomod);
}
int lcm(int aaa,int bbb){
	return (aaa/__gcd(aaa,bbb))*bbb;
}
int C(int x){
	return x*(x-1)/2;
}
// --------------------------------------**

double a,b,c,d;

void solve(){
	cin >> a >> b >> c >> d;
	if(a>c){
		swap(a,c);
		swap(b,d);
	}
	double aa = c-a;
	cout << fixed << setprecision(7) << a+aa/(b+d)*b << '\n';
}

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

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

// #define int long long
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define irreps(i, m, n) for (int i = ((int)(n)-1); i > (int)(m); ++i)
#define SORT(v, n) sort(v, v + n);
#define REVERSE(v, n) reverse(v, v+n);
#define vsort(v) sort(v.begin(), v.end());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cinline(n) getline(cin,n);
#define replace_all(s, b, a) replace(s.begin(),s.end(), b, a);
#define PI (acos(-1))
#define FILL(v, n, x) fill(v, v + n, x);
#define sz(x) (int)(x.size())

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vs = vector<string>;
using vpll = vector<pair<ll, ll>>;
using vtp = vector<tuple<ll,ll,ll>>;
using vb = vector<bool>;
using ld = long double;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;

const ll INF = 1e9+10;
// const ll MOD = 1e9+7;
const ll MOD = 998244353;
const ll LINF = 1e18;

// どの2数も共通の約数をもつ
// 全ての約数は
// gcd(A)=1
// n個の素数があれば作れるが10000までには1200個程度しかない n<=2500なので足りない
// 素因数は3つあればよい？
// ac ab ab ab ab bc
// こんな感じでサイクルを作れば良さそう
// 2*3331 2*3 2*3*2 ... 3*3331
// 2*3 2*3*2 2*3*3 ... これだと15000くらいになる
// サイクルではなく1個の頂点からの木のようなグラフを考える => 2数が共通の約数をもたない
// 4頂点の完全グラフ => 2190個で足りない
// ad, ab, abc, bcd
// 5頂点 ae ab abc abcd bcde 1973


signed main()
{
  cin.tie( 0 ); ios::sync_with_stdio( false );
  
  int n; cin>>n;
  
  int a,b,c;
  a=2;
  b=3;
  c=5;
  int ac=a*c, ab=a*b, bc=b*c;
  vc<int> B;
  B.push_back(ac);
  B.push_back(ab);
  B.push_back(bc);
  
  set<int> s;
  s.insert(ac);
  s.insert(ab);
  s.insert(bc);
  
  int now, x;
  now=ac, x=2;
  while(now*x<=10000){
    while(x%b==0 or s.count(now*x)){
      x++;
    }
    if(now*x>10000) break;
    s.insert(now*x);
    B.push_back(now*x);
  }
  now=ab, x=2;
  while(now*x<=10000){
    while(c%2==0 or s.count(now*x)){
      x++;
    }
    if(now*x>10000) break;
    s.insert(now*x);
    B.push_back(now*x);
  }
  now=bc, x=2;
  while(now*x<=10000){
    while(x%a==0 or s.count(now*x)){
      x++;
    }
    if(now*x>10000) break;
    s.insert(now*x);
    B.push_back(now*x);
  }
  
  // cout<<ngcd(b)<<endl;
  
  if(B.size()<n or B.back()>10000){
    cout<<B.size()<<' '<<B.back()<<endl;
    exit(-1);
  }
  
  rep(i,n){
    cout<<B[i]<<endl;
  }
  
}