#include <bits/stdc++.h>
using namespace std;
typedef struct {
  long long a;
  long long b;
} point;
bool compare(point x, point y) {
  if (x.b != y.b) return x.b < y.b;
  return x.a < y.a;
}
int main() {
  long long n, r, avg, target = 0, sum = 0, essay = 0, i;
  vector<point> test;
  cin >> n >> r >> avg;
  target = avg * n;
  for (i = 0; i < n; i++) {
    point temp;
    cin >> temp.a >> temp.b;
    sum += temp.a;
    test.push_back(temp);
  }
  sort(test.begin(), test.end(), compare);
  int siz = test.size();
  for (i = 0; i < siz; i++) {
    if (sum >= target) break;
    if (target - sum <= r - test[i].a) {
      essay += test[i].b * (target - sum);
      sum = target;
    } else {
      sum += r - test[i].a;
      essay += test[i].b * (r - test[i].a);
    }
  }
  cout << essay;
  return 0;
}
