#include <bits/stdc++.h>
using namespace std;
struct exam {
  long long a;
  long long b;
};
exam a[200000];
long long n, r, avg;
bool comp(exam a, exam b) { return a.b < b.b; }
int main() {
  cin >> n >> r >> avg;
  for (int i = 0; i < n; i++) cin >> a[i].a >> a[i].b;
  sort(a, a + n, comp);
  long long needed = n * avg;
  long long owned = 0;
  for (int i = 0; i < n; i++) {
    owned += a[i].a;
  }
  needed -= owned;
  long long answer = 0;
  int i = 0;
  while (needed > 0 && i < n) {
    if (r - a[i].a < needed) {
      answer += (r - a[i].a) * a[i].b;
      needed -= (r - a[i].a);
    } else {
      answer += (needed)*a[i].b;
      needed = 0;
    }
    i++;
  }
  cout << answer << endl;
}
