#include <bits/stdc++.h>
using namespace std;
bool sort_by_essays(pair<double, double> p1, pair<double, double> p2) {
  return (p1.second < p2.second);
}
int main() {
  double n, max_grade, req_avr;
  cin >> n >> max_grade >> req_avr;
  req_avr = req_avr > 1e6 ? 1e6 : req_avr;
  long long req_val = req_avr * n;
  vector<pair<double, double>> data;
  double tot = 0;
  double k = n;
  while (k--) {
    pair<double, double> p;
    cin >> p.first >> p.second;
    tot += p.first;
    data.push_back(p);
  }
  long long cnt_essays = 0;
  bool flag = 0;
  sort(begin(data), end(data), sort_by_essays);
  if (tot >= req_val) {
    cout << 0 << endl;
  } else {
    for (int i = 0; i < n; i++) {
      if (flag && req_val > tot) break;
      if ((max_grade - data[i].first) <= req_val - tot) {
        cnt_essays += (max_grade - data[i].first) * data[i].second;
        tot += (max_grade - data[i].first);
      } else {
        cnt_essays += (req_val - tot) * data[i].second;
        tot += (req_val - tot);
        flag = 1;
      }
    }
    cout << cnt_essays << endl;
  }
}
