#include <bits/stdc++.h>
using namespace std;
struct data {
  long long int a;
  long int b;
};
bool cmp(struct data a, struct data b) {
  if (a.b < b.b)
    return true;
  else
    return false;
}
int main() {
  long long int s = 0, n, r, avg, i, p = 0;
  scanf("%lld%lld%lld", &n, &r, &avg);
  struct data a[n];
  for (i = 0; i < n; i++) {
    scanf("%lld%lld", &a[i].a, &a[i].b);
    s = s + a[i].a;
  }
  long long int avgg = s / n;
  if (avgg >= avg) {
    printf("0\n");
    return 0;
  }
  long long int d = n * avg - s;
  sort(a, a + n, cmp);
  i = 0;
  long long int ans;
  while (i < n && d != 0) {
    ans = (r - a[i].a);
    if (d > ans) {
      p = p + ans * a[i].b;
      d = d - ans;
    } else {
      p = p + d * a[i].b;
      d = 0;
    }
    i++;
  }
  printf("%lld\n", p);
}
