#include <bits/stdc++.h>
using namespace std;
int 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, cur, a, b;
  cin >> N >> r >> avg;
  avg = (avg * N);
  cur = 0;
  vector<pair<long long, long long> > vct;
  for (int i = 0; i < N; i++) {
    cin >> a >> b;
    cur += a;
    if (a < r) vct.push_back(pair<long long, long long>(a, b));
  }
  sort(vct.begin(), vct.end(), cmp);
  long long ans = 0;
  if (cur < avg)
    for (int i = 0; i < vct.size(); i++) {
      long long req = (avg - cur);
      if (req >= (r - vct[i].first)) {
        ans = ans + (r - vct[i].first) * vct[i].second;
        cur = cur + (r - vct[i].first);
      } else {
        ans = ans + (req)*vct[i].second;
        cur = cur + req;
      }
      if (cur >= avg) break;
    }
  cout << ans << endl;
  return;
}
int main() {
  solve();
  return 0;
}
