#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5;
struct myStruct {
  int a, b;
} data[MAX + 5];
bool cmp(struct myStruct A, struct myStruct B) { return A.b < B.b; }
int main(void) {
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> data[i].a >> data[i].b;
    sum += data[i].a;
  }
  sort(data, data + n, cmp);
  long long need = avg * n - sum;
  long long counter = 0;
  for (int i = 0; i < n; i++) {
    if (need - (r - data[i].a) >= 0) {
      counter += (r - data[i].a) * data[i].b;
      need -= (r - data[i].a);
    } else {
      while (need > 0) {
        need--;
        counter += data[i].b;
      }
    }
    if (need <= 0) break;
  }
  cout << counter << endl;
  return 0;
}
