#include <bits/stdc++.h>
using namespace std;
struct node {
  int a;
  int b;
} p[100010];
int cmp(node x, node y) { return x.b < y.b; }
int main() {
  long long n, r, avg;
  while (scanf("%lld%lld%lld", &n, &r, &avg) != EOF) {
    long long sumavg = n * avg, sum = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d %d", &p[i].a, &p[i].b);
      sum += p[i].a;
    }
    if (sum >= sumavg) {
      printf("0");
      continue;
    }
    long long ans = 0;
    sort(p, p + n, cmp);
    for (int i = 0; i < n && sum < sumavg; i++) {
      long long t = min(sumavg - sum, r - p[i].a);
      sum += t;
      ans += t * p[i].b;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
