#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define INF 100000000

using namespace std;

//unsigned long long a[(2*100000)+10]={0};

// To compute x^y under modulo m 
ull power(ull x, ull y, ull m) 
{ 
    if (y == 0) 
        return 1; 
    ll p = power(x, y / 2, m) % m; 
    p = (p * p) % m; 
  
    return (y % 2 == 0) ? p : (x * p) % m; 
} 

// Function to find modular inverse of a under modulo m 
// Assumption: m is prime 
ull modInverse(ull x, ull m) 
{ 
	return power(x,m-2,m);
} 
  

int main(){
	
	int n,k,temp,ans;
	cin>>n>>k;
	ans = 0;
	temp = (n*(n+1))/2;
	ans = temp*100*k;
	
	temp = (k*(k+1))/2;
	ans = ans + (temp*n);
	cout<<ans;
}



#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;

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