#include <bits/stdc++.h>
using namespace std;
bool cmp(const pair<long long, long long>& a,
         const pair<long long, long long>& b) {
  return a.second < b.second;
}
int main() {
  long long n, r, average;
  cin >> n >> r >> average;
  long long desiredScore = average * n;
  long long currentScore = 0;
  vector<pair<long long, long long> > exams;
  for (int i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    currentScore += a;
    exams.push_back(make_pair(a, b));
  }
  sort(exams.begin(), exams.end(), cmp);
  long long examsWritten = 0;
  long long currentExam = 0;
  while (currentScore < desiredScore && currentExam < n) {
    if (exams[currentExam].first < r) {
      long long mini =
          min(desiredScore - currentScore, r - exams[currentExam].first);
      examsWritten += exams[currentExam].second * mini;
      exams[currentExam].first += mini;
      currentScore += mini;
    }
    currentExam++;
  }
  cout << examsWritten << endl;
  return 0;
}
