#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, sr;
  cin >> n >> r >> sr;
  pair<long long, long long> a[n];
  long long s = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i].second >> a[i].first;
    s += a[i].second;
  }
  sr *= n;
  if (s >= sr) {
    cout << 0;
    return 0;
  }
  long long o = 0;
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (a[i].second < r) {
      if (s + r - a[i].second < sr) {
        s += r - a[i].second;
        o += (r - a[i].second) * a[i].first;
      } else {
        long long c = sr - s;
        s += a[i].second * c;
        o += c * a[i].first;
        break;
      }
    }
  }
  cout << o;
}
