#include <bits/stdc++.h>
using namespace std;
struct exam {
  long long pr, ma;
  exam() {}
  exam(long long pr, long long ma) {
    this->pr = pr;
    this->ma = ma;
  }
};
bool cmp(exam a, exam b) { return a.pr < b.pr; }
vector<exam> e;
int main() {
  long long n, r, need;
  cin >> n >> r >> need;
  need *= n;
  long long have = 0;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    e.push_back(exam(b, a));
    have += a;
  }
  need = need - have;
  sort(e.begin(), e.end(), cmp);
  long long ans = 0;
  for (int i = 0; i < e.size(); i++) {
    if (need > 0) {
      if (need <= r - e[i].ma) {
        ans += e[i].pr * need;
        need = 0;
      } else {
        long long get = r - e[i].ma;
        ans += get * e[i].pr;
        need -= get;
      }
    }
  }
  cout << ans << endl;
}
