#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
pair<long long, long long> p[100011];
int main() {
  long long n, r, sr;
  cin >> n >> r >> sr;
  for (int i = 1; i <= n; i++) cin >> p[i].second >> p[i].first;
  sort(p + 1, p + n + 1);
  long long m = 0;
  for (int i = 1; i <= n; i++) m += (long long)p[i].second;
  if (m >= sr * n) {
    cout << 0;
    return 0;
  }
  int uk = 1;
  long long ans = 0;
  while (m < sr * n) {
    long long pl = sr * n - m;
    if (pl <= (r - p[uk].second)) {
      ans += p[uk].first * pl;
      m += pl;
      break;
    } else {
      ans += (r - p[uk].second) * p[uk].first;
      m += (r - p[uk].second);
      uk++;
    }
  }
  cout << ans;
}
