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