#include <bits/stdc++.h>
using namespace std;
struct Exam {
  long long grade;
  long long essay;
  bool operator()(const Exam& a, const Exam& b) { return a.essay < b.essay; }
} comp;
int main() {
  vector<Exam> exams;
  long long n = 0, r = 0, target_avg = 0, avg = 0;
  cin >> n >> r >> target_avg;
  target_avg *= n;
  int i = 0;
  while (i < n) {
    long long grade = 0, essay = 0;
    cin >> grade >> essay;
    avg += grade;
    Exam e = {grade, essay};
    if (grade != r) {
      exams.push_back(e);
    }
    i++;
  }
  std::sort(exams.begin(), exams.end(), comp);
  long long needed_essays = 0;
  i = 0;
  while (avg < target_avg) {
    long long max_inc = std::min(r - exams[i].grade, target_avg - avg);
    long long essay_count = max_inc * exams[i].essay;
    needed_essays += essay_count;
    avg += max_inc;
    ++i;
  }
  cout << std::fixed << needed_essays << endl;
  return 0;
}
