#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, r;
long long avg, sum, lim, ans;
struct data {
  int a, b;
  long long lim;
} a[100005];
bool operator<(data a, data b) { return a.b < b.b; }
int main() {
  n = read();
  r = read();
  avg = read();
  avg *= n;
  for (int i = 1; i <= n; i++) {
    a[i].a = read(), a[i].b = read(), sum += a[i].a;
    a[i].lim = (r - a[i].a);
  }
  if (sum >= avg) {
    puts("0");
    return 0;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n && sum < avg; i++) {
    long long t = min(avg - sum, a[i].lim);
    sum += t;
    ans += t * a[i].b;
  }
  printf("%I64d", ans);
  return 0;
}
