#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
pair<long long, long long> a[N];
long long top, k, n, avr, mx;
int main() {
  scanf("%d %d %d", &n, &mx, &avr);
  for (int i = 1; i <= n; i++) {
    int b, r;
    scanf("%d %d", &b, &r);
    a[i] = make_pair(r, b);
    top += b;
  }
  sort(a + 1, a + 1 + n);
  long long tmp = 0, i = 1;
  while (top < avr * n) {
    long long t = min(avr * n - top, mx - a[i].second);
    top += t;
    tmp += t * a[i].first;
    i++;
  }
  cout << tmp << endl;
  return 0;
}
