#include <bits/stdc++.h>
using namespace std;
struct sort_pred {
  bool operator()(const std::pair<int, int> &left,
                  const std::pair<int, int> &right) {
    return left.second < right.second;
  }
};
int main() {
  long long int n;
  cin >> n;
  long long int r;
  cin >> r;
  long long int avg;
  cin >> avg;
  vector<pair<long long int, long long int> > input;
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    pair<long long int, long long int> temp;
    cin >> temp.first;
    cin >> temp.second;
    sum += temp.first;
    input.push_back(temp);
  }
  sort(input.begin(), input.end(), sort_pred());
  long long int optimal = n * avg;
  long long int ans = 0;
  if (sum >= optimal)
    cout << "0\n";
  else {
    long long int balance = optimal - sum;
    for (long long int i = 0; i < input.size(); i++) {
      if (input.at(i).first < r) {
        long long int how = r - input.at(i).first;
        if (how < balance) {
          balance = balance - how;
          ans = ans + input.at(i).second * how;
        } else {
          ans = ans + input.at(i).second * balance;
          break;
        }
      }
    }
    cout << ans << "\n";
  }
  return 0;
}
