#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg, res = 0, ni;
  cin >> n >> r >> avg;
  pair<int, int> p[100100];
  int a, b;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    sum += a;
    p[i].first = b, p[i].second = a;
  }
  ni = (n * avg) - sum;
  sort(p, p + n);
  if (sum >= n * avg)
    cout << 0 << endl;
  else {
    for (int i = 0; i < n; i++) {
      if (p[i].second < r) {
        if (r - p[i].second <= ni)
          ni -= r - p[i].second, res += (r - p[i].second) * p[i].first;
        else
          res += ni * p[i].first, ni = 0;
      }
      if (ni == 0) break;
    }
    cout << res << endl;
  }
  return 0;
}
