#include <bits/stdc++.h>
using namespace std;
struct my {
  int grd, e;
};
my arr[100005];
bool comp(my a, my b) {
  if (a.e < b.e) {
    return true;
  }
  if (a.e == b.e) {
    if (a.grd < b.grd) {
      return true;
    }
  }
  return false;
}
int main() {
  long long int n, g, a;
  cin >> n >> g >> a;
  long long int tavg = a * n;
  long long int sum = 0;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i].grd >> arr[i].e;
    sum += arr[i].grd;
  }
  if (sum >= tavg) {
    cout << "0" << endl;
    return 0;
  }
  long long int req = tavg - sum;
  sort(arr + 1, arr + n + 1, comp);
  long long int res = 0;
  for (int i = 1; i <= n; i++) {
    long long int ano = g - arr[i].grd;
    if (req <= 0) {
      break;
    }
    if (ano > req) {
      ano = req;
      res += (ano * arr[i].e);
      break;
    }
    res += ano * arr[i].e;
    req = req - ano;
  }
  cout << res << endl;
  return 0;
}
