#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
void solve() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long>> p(n);
  long long a, b;
  long long s = 0;
  for (long long i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    s += p[i].first;
  }
  long long w = (avg * n) - s;
  long long ans = 0;
  sort(p.begin(), p.end(), cmp);
  for (long long i = 0; i < n and w > 0; i++) {
    if (p[i].first < r) {
      if (w > r - p[i].first) {
        ans += (r - p[i].first) * (p[i].second);
        w -= r - p[i].first;
      } else {
        ans += w * p[i].second;
        w = 0;
      }
    }
  }
  cout << ans << endl;
}
int32_t main() {
  solve();
  return 0;
}
