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