#include <bits/stdc++.h>
using namespace std;
int c[1000000];
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > vec;
  long long a, b;
  double myavg = 0;
  long long sum = 0;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    vec.push_back(make_pair(b, a));
    sum += a;
  }
  sort(vec.begin(), vec.end());
  int j = 0;
  while (true) {
    if (sum >= avg * n) break;
    ans += min(avg * n - sum, r - vec[j].second) * vec[j].first;
    sum += min(avg * n - sum, r - vec[j].second);
    j++;
  }
  cout << ans << endl;
  return 0;
}
