#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using P = pair<ll, ll>;

 int main(){

     int n,x;
     cin >> n >> x;

    double sum = 0;
     rep(i,n) {
         int v,p;
         cin >> v >> p;
         sum += v * p; 
        if(sum > x * 100){
            cout << i + 1 << endl;
            return 0;
        }
     }
     cout << -1 << endl;

 }
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file 
#include <ext/pb_ds/tree_policy.hpp> 
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#include <functional> // for less 
#include <iostream> 
using namespace __gnu_pbds; 
using namespace std; 
  
 
#define int long long
#define mod 1000000007 
 
typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update> 
    ordered_set; 
typedef tree<int, null_type, 
             less_equal<int>, rb_tree_tag, 
             tree_order_statistics_node_update> 
    ordered_multiset;

int findintegers(double a,double b)
{int c=floor(b);
int d=ceil(a);
cout<<d-c+1<<" okpaka\n";
return d-c+1;
}



int32_t main()
{
#ifndef ONLINE_JUDGE
	freopen("inp.txt",  "r",  stdin);
	freopen("m3.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
long double x,y,r;

cin>>x>>y>>r;
r+=(1e-14);
long double nx1=x+r;
long double nx2=x-r;
int ub1=ceil(nx2);
int ub2=floor(nx1);
int sum=0;
for(int i=ub1;i<=ub2;i++)
{
long double c=r*r-(i-x)*(i-x);
if(c>=0)
{long double val1=sqrt(c)+y;
long double val2=-sqrt(c)+y;
int lb1=floor(val1);
int lb2=ceil(val2);
sum+=(lb1-lb2+1);
}
}
cout<<sum<<endl;
	
return 0;

	}