#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) { return (a.second < b.second); }
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > a(n);
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
    sum += a[i].first;
  }
  sort(a.begin(), a.end(), comp);
  long long count = max(0ll, avg * n - sum);
  long long res = 0;
  for (int i = 0; count > 0 && i < n; i++) {
    long long t = min(count, r - a[i].first);
    res += t * a[i].second;
    count -= t;
  }
  cout << res << endl;
  return 0;
}
