#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	int x;
	double y = 0;

	cin >> x;

	double pz[x];
	double pp[x];
	double a[x];
	double maxi;
	int redmax;

	for(int i=1; i<=x; i++)
	{
		cin >> pz[i];
		while(pp[i]<=100 && pp[i]>=0)
        {
			cin >> pp[i];
            if(pp[i]<=100 && pp[i]>=0)
            {
                if(fmod(pp[i], 1)==0.5)
                {
                    pp[i]+=0.5;
                }
                break;
            }
		}
	}
	for(int i=1; i<=x; i++)
	{
		double zbir = 0;
		for(int n=1; n<=x; n++)
		{
			if(pp[n]>=pp[i])
			{
				zbir+= (pz[n]/100)*pp[i];
			}
		}
		a[i]=zbir;
	}
	for(int i=0; i<=x; i++)
    {
    	for(int j=1; j<=x; j++)
    	{
    		if(a[i]<a[j])
    		{
    			redmax = j;
    			maxi = a[j];
    		}
    	}
    }

    cout << pp[redmax] << endl;

	return 0;
}