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