#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long>> a(n);
  long long s = 0;
  for (long i = 0; i < n; i++) {
    cin >> a[i].second >> a[i].first;
    s += a[i].second;
  }
  sort(a.begin(), a.end());
  long long missingPoints = max(avg * n - s, (long long)0);
  long long essays = 0;
  for (long i = 0; i < n && missingPoints > 0; i++) {
    essays += a[i].first * min(missingPoints, r - a[i].second);
    missingPoints -= min(missingPoints, r - a[i].second);
  }
  cout << essays << "\n";
  return 0;
}
