#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, r, a;
  cin >> n >> r >> a;
  pair<long long, long long> p[n];
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> p[i].second >> p[i].first;
    sum += p[i].second;
  }
  sort(p, p + n);
  long long t = a * n - sum;
  if (t <= 0) {
    cout << 0;
    return 0;
  }
  long long ans = 0;
  long long i = 0;
  while (t > 0) {
    if (t < r - p[i].second) {
      ans += p[i].first * (t);
      t = 0;
    } else {
      ans += p[i].first * (r - p[i].second);
      t -= r - p[i].second;
      i++;
    }
  }
  cout << ans;
  return 0;
}
