#include <bits/stdc++.h>
using namespace std;
struct exam {
  int a, b;
} e[100005];
bool cmp(const exam a, const exam b) { return a.b < b.b; }
int main() {
  int n, r;
  long long sum = 0;
  double avg;
  scanf("%d%d%lf", &n, &r, &avg);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &e[i].a, &e[i].b);
    sum += e[i].a;
  }
  if (sum / n >= avg)
    printf("0\n");
  else {
    long long cnt = 0;
    sort(e + 1, e + 1 + n, cmp);
    long long tmpS = avg * n - sum;
    int index = 1;
    while (tmpS != 0 && index <= n) {
      long long t = (r - e[index].a) > tmpS ? tmpS : (r - e[index].a);
      tmpS -= t;
      cnt += t * e[index].b;
      index++;
    }
    printf("%I64d\n", cnt);
  }
  return 0;
}
