#include <bits/stdc++.h>
using namespace std;
struct entry {
  long long g, e;
};
bool f(const entry &a, const entry &b) { return a.e < b.e; }
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<entry> v(n);
  long long current = 0;
  for (int i = 0; i < n; i++) {
    cin >> v[i].g >> v[i].e;
    current += v[i].g;
  }
  sort(v.begin(), v.end(), f);
  long long sol = 0;
  for (int i = 0; current < n * avg && i < n; i++) {
    long long f = min(n * avg - current, r - v[i].g);
    current += f;
    sol += f * v[i].e;
  }
  cout << sol << endl;
  return 0;
}
