#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
int main() {
  ll n, r, avg, need = 0;
  cin >> n >> r >> avg;
  vector<pii> ba(n);
  for (int i = 0; i < n; i++) {
    cin >> ba[i].second >> ba[i].first;
    need += ba[i].second;
  }
  ll ans = 0;
  need = n * avg - need;
  sort(ba.begin(), ba.end());
  for (pii p : ba) {
    if (need <= 0) break;
    ll t = min(need, r - p.second);
    ans += t * p.first;
    need -= t;
  }
  cout << ans << endl;
}
