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