#include <bits/stdc++.h>
using namespace std;
void tmkc() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(0);
}
int main() {
  tmkc();
  long long int n, i, j, r, avg, k, s = 0, e = 0;
  cin >> n >> r >> avg;
  vector<pair<long long int, long long int>> vp;
  for (i = 0; i < n; i++) {
    cin >> j >> k;
    vp.push_back(make_pair(k, j));
    s += j;
  }
  sort(vp.begin(), vp.end());
  i = 0;
  while (i < n && s < (avg * n)) {
    if (vp[i].second < r) {
      j = r - vp[i].second;
      if (j + s <= (avg * n)) {
        s += j;
        e += j * (vp[i].first);
      } else {
        j = (avg * n) - s;
        e += j * (vp[i].first);
        s += j;
      }
    }
    i++;
  }
  cout << e;
  return 0;
}
