#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n , dp[5005][5005];
pair<ll,ll> a[5005];
bool cmp(pair<ll,ll> x,pair<ll,ll> y){
    return x.first+x.second < y.first+y.second;
}
int main(){
    ios_base:: sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    cin>>n;
    for(ll i=0;i<n;i++)cin>>a[i].first>>a[i].second;
    sort(a,a+n,cmp);
    memset(dp,0x3f,sizeof(dp));
    dp[0][0]=0;
    for(ll i=0;i<n;i++){
        for(ll j=0;j<=i;j++){
            if(dp[i][j]<=a[i].first)
                dp[i+1][j+1]=min(dp[i+1][j+1] , dp[i][j] + a[i].second);
            dp[i+1][j]=min(dp[i+1][j],dp[i][j]);
        }
    }
    for(ll i=n;i>=0;i--)if(dp[n][i]<(1e16))return cout<<i , 0;
}

#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <numeric>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

#define int long long int
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(x) (x).begin(), (x).end()
#define capi(x) int x;cin>>x
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

using vi = vector<int>;
using pi = pair<int, int>;
using vp = vector<pi>;

template<class T>bool chmax(T &a, const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a, const T &b){if(b<a){a=b;return 1;}return 0;}

#define P (1'000'000'007)

signed main() {
    int d, g;
    cin >> d >> g;

    vi vs;
    vp vc;

    rep(i, d) {
        int p, c;
        cin >> p >> c;

        vs.push_back(p - 1);
        vc.push_back(make_pair(p, (i + 1) * 100 * p + c));
    }
    
    int ans = INT_MAX;
    rep(i, 1 << d) {
        int cost = g;
        int res = 0;
        rep(j, d) {
            if (((1 << j) & i) > 0) {
                cost -= vc[j].second;
                res += vc[j].first;
            }
        }

        for (int j = d - 1; j >= 0; --j) {
            if (cost <= 0) break;
            if(((1 << j) & i) > 0) continue;
            int x = min(vs[j], 1 + (cost - 1) / ((j + 1) * 100));
            res += x;
            cost -= x * (j + 1) * 100;
        }

        if (cost <= 0) {
            chmin(ans, res);
        }
    }

    cout << ans;

    return 0;
}
