#define _USE_MATH_DEFINES
#include  <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include <stdlib.h>
#include<stdio.h>
#include <queue>
#include<map>
#include <sstream>
#include<set>
#include<stack>
#include<time.h>
typedef long long int ll;
//#include<bits/stdc++.h>


using namespace std;


int main()
{
    int n; int x;
    cin >> n >> x;
    int t = -1;
    x *= 100;
    for (int i = 0; i < n; i++) {
        double a, b;
        cin >> a >> b;
        
        x -= a * b;
        if (x < 0&&t==-1)t = i + 1;
    }
    cout << t << endl;
   

    return 0;

}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double t;
    cin>>t;
    long long n;
    cin>>n;
    long long res = ceil((n*100)/t) + n-1;
    cout<<res;  
}