#include <bits/stdc++.h>
using namespace std;
long long n, r, avg;
int main() {
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > ps(n);
  long long req = avg * n;
  long long avail = 0;
  for (int i = 0; i < n; i++) {
    cin >> ps[i].second >> ps[i].first;
    avail += ps[i].second;
  }
  long long mi, temp;
  sort(ps.begin(), ps.end());
  long long noe = 0, ga;
  for (int i = 0; i < n && avail < req; i++) {
    ga =
        (r - ps[i].second) < (req - avail) ? (r - ps[i].second) : (req - avail);
    avail += ga;
    noe += ga * ps[i].first;
  }
  cout << noe;
  return 0;
}
