#include <bits/stdc++.h>

using namespace std;

struct state_t
{
    int cookies, S, T;

    state_t( int s ) : cookies( 0 ), S( s ), T( 0 )
    {
    }

    int ceil_time_units( int x ) const
    {
        return ( x + S - 1 ) / S;
    }

    int min_time( int C )
    {
        return T + ceil_time_units( C - cookies );
    }

    int delta( int cost ) const
    {
        int t = 0; if ( cost > cookies ) t = ceil_time_units( cost - cookies ); return t;
    }

    void update_time( int delta )
    {
        T += delta, cookies += delta * S;
    }

    void buy( int cost, int production )
    {
        cookies -= cost, S += production;
    }
};

struct factory_t
{
    int cost, production; bool bought;

    factory_t()
    {
        cin >> cost >> production, bought = false;
    }

    void buy( state_t &x )
    {
        x.buy(  cost,  production ), bought = true;
    }

    void backtrack( state_t &x )
    {
        x.buy( -cost, -production ), bought = false;
    }
};

struct factories_t: vector< factory_t >
{
    int C;

    int min_time( state_t x )
    {
        int t_min = x.min_time( C );

        for( int i = 0, n = size(); i < n; i++ )
            if ( not at( i ).bought )
            {
                int delta = x.delta( at( i ).cost );

                if ( delta > 0 )
                    x.update_time( delta );

                at( i ).buy( x ), t_min = min( t_min, min_time( x ) ), at( i ).backtrack( x );

                if ( delta > 0 )
                    x.update_time( -delta );
            }

        return t_min;
    }
};

int main()
{
    ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr );

    int N, S; factories_t factories; cin >> N >> factories.C >> S, factories.resize( N );

    state_t initial_state( S );

    cout << factories.min_time( initial_state );
}
