#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  long long int r;
  long long int a;
  cin >> n >> r >> a;
  vector<long long> sj;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    long long tg;
    long long en;
    cin >> tg >> en;
    sum += tg;
    en <<= 32;
    sj.push_back(tg + en);
  }
  sort(sj.begin(), sj.end());
  long long tp = a * n - sum;
  int c = 0;
  long long ec = 0;
  while (tp > 0) {
    long long cn = sj[c];
    long long tg = ((1LL << 32) - 1) & cn;
    long long en = cn >> 32;
    if (tg == r) {
      c++;
      continue;
    }
    long long mn = min(r - tg, tp);
    ec += en * mn;
    tp -= mn;
    sj[c] += mn;
    c++;
  }
  cout << ec << endl;
}
