#include <bits/stdc++.h>
using namespace std;
double a[100005], b[100005];
vector<pair<long long, long long> > vct;
int main(void) {
  long long n, r, avg;
  cout.sync_with_stdio(false);
  cin >> n >> r >> avg;
  long long max = 0, req = n * avg;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    max += a[i];
    if (a[i] < r) vct.push_back(make_pair(b[i], r - a[i]));
  }
  if (max >= req) {
    cout << "0\n";
    return 0;
  }
  long long need = req - max;
  std::sort(vct.begin(), vct.end());
  long long res = 0;
  for (int i = 0; i < vct.size(); i++) {
    if (need <= vct[i].second) {
      res += (need * vct[i].first);
      break;
    }
    res += (vct[i].second * vct[i].first);
    need -= vct[i].second;
  }
  cout << res << endl;
  return 0;
}
