#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg;
  vector<long long> a, b;
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > marks;
  long long i;
  a.assign(n, 0LL);
  b.assign(n, 0LL);
  marks.assign(n, {0LL, 0LL});
  long long sum = 0LL;
  long long excess, tot = 0LL;
  for (i = 0; i < n; i++) {
    cin >> a[i] >> b[i];
    sum += a[i];
    marks[i] = {b[i], r - a[i]};
  }
  sort(marks.begin(), marks.end());
  if (sum >= avg * n)
    cout << 0 << "\n";
  else {
    excess = avg * n - sum;
    for (i = 0; i < n; i++) {
      if (excess == 0LL) break;
      tot += (min(excess, marks[i].second) * (marks[i].first));
      excess -= min(excess, marks[i].second);
    }
    cout << tot << "\n";
  }
  return 0;
}
