#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
struct Node {
  long long a, b;
};
struct Node sub[N];
int n;
long long r, avg;
bool cmp(const Node &x, const Node &y) { return x.b < y.b; }
int main() {
  int i;
  long long tot = 0, ans = 0;
  scanf("%d %lld %lld", &n, &r, &avg);
  for (i = 0; i < n; i++) {
    scanf("%lld %lld", &sub[i].a, &sub[i].b);
    tot += sub[i].a;
  }
  sort(sub, sub + n, cmp);
  if (tot >= (long long)n * avg)
    printf("%d\n", 0);
  else {
    tot = (long long)n * avg - tot;
    for (i = 0; i < n; i++) {
      if (sub[i].a == r) continue;
      if (tot <= r - sub[i].a) {
        ans = ans + sub[i].b * (tot);
        break;
      } else {
        ans = ans + sub[i].b * (r - sub[i].a);
        tot = tot - (r - sub[i].a);
      }
    }
    printf("%lld\n", ans);
  }
  return 0;
}
