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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(12);
  int n, d, h;
  cin >> n >> d >> h;
  vector<int> a(n), b(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
  } 
  long double lo = 0, hi = (long double) h;
  long double res;
  for (int i = 0; i < 100; i++) {
    long double mid = (lo + hi) / 2.0;
    long double slope = ((long double) h - mid) / (long double) d;
    bool ok = true;
    for (int j = 0; j < n; j++) {
      long double cur = slope * (long double) a[j] + mid;
      if (cur < (long double) b[j]) {
        ok = false;
      }
    }
    if (ok) {
      res = mid;
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  cout << max((long double) 0, res) << '\n';
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define lld long long int
#define M 1000000007
#define fors(i,n) for(int i=0;i<n;++i)
#define fore(i,a,b) for(int i=a;i<=b;++i)
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define vv vector<int>
#define endl "\n"
#define test(i) cout<<i<<endl
#define itrt int t; cin>>t; fors(i,t)
#define itr1 int t; cin>>t;
#define ff first
#define ss second
#define pb push_back
#define vmp make_pair
#define ppb pop_back
#define sorta(arr,n) sort(arr,arr+n)
#define sortv(x) sort(x.begin(),x.end())
void file(){
    #ifdef LOCAL
    freopen("demo.in","r",stdin);
    freopen("demo.out","w",stdout);
    #endif
}
// lld sum=0;
// vector<int> visited(2001);
// vector<int>arr[2001];

// void dfs(int i){
//     visited[i]=1;
//     ++sum;
//     for(int x:arr[i]){
//         if(visited[x]){
//             continue;
//         }
//         dfs(x);
//     }
// }
void run(){
    int n;
    cin>>n;
    bitset<100001> dp;
    dp[0]=1;
    int sum=0;
    fors(i,n){
        int x;
        cin>>x;
        sum+=x;
        dp |= dp<<x;
    }
    // cout<<"sum: "<<sum/2<<endl;
    int temp = sum;
    for(int i=0;i<=sum;++i){
        if(dp[i]){
            temp = min(temp,max(i,sum-i));
        }
    }
    // cout<<"ans:"<<endl;
    cout<<temp<<endl;
}

int main(){
    fastio;
    // // file();
    int t=1;
    // cin>>t;
    for(int nr=0;nr<t;++nr){
        run();
    }    
}