using namespace std;
struct xk{
    int a,b;
};
bool cmp(xk &x,xk &y)
{
    return x.b<y.b;
}
int main()
{
    int n,r,avg;
    while(cin>>n>>r>>avg)
    {
        vector<xk> v;
        int sumying=avg*n,sumxian=0,cha;
        for(int i=0;i<n;i++)
        {xk t;cin>>t.a>>t.b;v.push_back(t);}
        sort(v.begin(),v.end(),cmp);
        for(int i=0;i<n;i++)
        {
            sumxian+=v[i].a;
        }
        if(sumxian>=sumying)
        {
            cout<<"0"<<endl;
            continue;
        }
        else{
            cha=sumying-sumxian;long long sj=0,k=0;
            while(cha!=0)
            {
                if(v[k].a<r)
                {sj+=v[k].b;cha--;v[k].a++;}
                else k++;
            }
            cout<<sj<<endl;
        }
    }
}