#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
const int INF = 0x3f3f3f3f;

#define FOR(i, b, e) for(int i = (b); i < (e); i++)
#define TRAV(x, a) for(auto &x: (a))
#define SZ(x) ((int)(x).size())
#define PB push_back
#define PR pair
#define X first
#define Y second

void solve(){
	vector<ll> vec;
	ll akt = 0;
	int n;
	cin >> n;
	FOR(i, 0, n){
		int a, b;
		cin >> a >> b;
		akt -= a;
		vec.PB(2ll*a+b);
	}
	sort(vec.rbegin(), vec.rend());
	int ans = 0;
	TRAV(x, vec){
		if(akt <= 0){
			ans++;
			akt += x;
		}
	}
	cout << ans << '\n';
}

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	// int tt; cin >> tt;
	// FOR(te, 0, tt){
	// 	// cout << "Case #" << te+1 << ": ";
	// 	solve();
	// }
	solve();
	return 0;
}

// Problem D

#include <stdio.h>
#include <iostream>
#include <vector>
#include <string.h>
#include <cassert>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <iomanip>

#define MAXN 1000
#define pb push_back
#define mp make_pair

using namespace std;

typedef long long int ll;
typedef pair<int, int> ii;

double p[101][101][101];
int a0, b0, c0;
int main() {
  cin >> a0 >> b0 >> c0;
  for (int a=0; a<=100; a++)
    for (int b=0; b<=100; b++)
      for (int c=0; c<=100; c++) {
	if (a<a0 || b<b0 || c<c0) p[a][b][c] = 0;
	else if (a == a0 && b == b0 && c == c0) p[a][b][c] = 1;
	else {
	  if (a > a0 && b!=100 && c!=100) p[a][b][c] += ((a-1)*p[a-1][b][c] / (a+b+c-1));
	  if (b > b0 && a!=100 && c!=100) p[a][b][c] += ((b-1)*p[a][b-1][c] / (a+b+c-1));
	  if (c > c0 && a!=100 && b!=100) p[a][b][c] += ((c-1)*p[a][b][c-1] / (a+b+c-1));
	  //~ cout << a << " " << b << " " << c << " " << p[a][b][c] << endl;
	}
      }
  double res = 0;
  int a, b, c;
  a = 100;
  for (b = b0; b<100; b++)
    for (c=c0; c<100; c++)
      res += p[a][b][c] * (a+b+c-a0-b0-c0);
  b = 100;
  for (a = a0; a<100; a++)
    for (c=c0; c<100; c++)
      res += p[a][b][c] * (a+b+c-a0-b0-c0);
  c = 100;
  for (b = b0; b<100; b++)
    for (a=a0; a<100; a++)
      res += p[a][b][c] * (a+b+c-a0-b0-c0);
      
  cout << std::setprecision(10) << res << endl;
  return 0;
}
