#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > a;
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a.push_back(make_pair(y, x));
    sum += x;
  }
  long long ans = 0;
  sort(a.begin(), a.end());
  for (long long i = 0; i < a.size(); i++) {
    if (sum / n >= avg) {
      break;
    }
    long long need = n * avg - sum;
    long long can = r - a[i].second;
    can = min(can, need);
    ans += can * a[i].first;
    sum += can;
  }
  cout << ans;
}
