#include <bits/stdc++.h>
using namespace std;
long long n, mx, ave;
struct node {
  long long get, va;
} t[100005];
int cmp(node a, node b) { return a.va < b.va; }
int main() {
  while (~scanf("%lld%lld%lld", &n, &mx, &ave)) {
    long long nowave, sum = 0;
    for (long long i = 0; i < n; i++) {
      scanf("%lld%lld", &t[i].get, &t[i].va);
      sum += t[i].get;
    }
    nowave = sum / n;
    if (nowave >= ave) {
      printf("0\n");
      continue;
    }
    long long ans = 0, ok = 0;
    sort(t, t + n, cmp);
    for (long long i = 0; i < n; i++) {
      if (t[i].get >= mx) continue;
      if (((sum + (mx - t[i].get)) / n) < ave) {
        ans += t[i].va * (mx - t[i].get);
        sum += (mx - t[i].get);
      } else {
        ans += (ave * n - sum) * t[i].va;
        ok = 1;
      }
      if (ok) break;
    }
    printf("%lld\n", ans);
  }
  return 0;
}
