#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long minimumScore = n * avg;
  vector<pair<long long, long long> > score;
  long long totalScore = 0;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    totalScore += a;
    score.push_back(make_pair(b, a));
  }
  sort(score.begin(), score.end());
  long long index = 0;
  long long ans = 0;
  long long kitnaScoreBadanaHai = minimumScore - totalScore;
  while (kitnaScoreBadanaHai > 0) {
    long long yahaKitnaBadaSaktaHu = r - score[index].second;
    if (kitnaScoreBadanaHai <= yahaKitnaBadaSaktaHu) {
      ans += (kitnaScoreBadanaHai)*score[index].first;
      break;
    } else {
      ans += (yahaKitnaBadaSaktaHu)*score[index].first;
      kitnaScoreBadanaHai -= yahaKitnaBadaSaktaHu;
      index++;
    }
  }
  cout << ans << endl;
}
