#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long avg;
  long long r;
  cin >> n >> r >> avg;
  avg *= n;
  pair<long long, long long> a[100000];
  long long sum = 0;
  for (int i = 0; i < n; i++)
    cin >> a[i].second >> a[i].first, sum += a[i].second;
  sort(a, a + n);
  long long result = 0;
  if (sum >= avg) {
    cout << 0;
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (sum + (r - a[i].second) <= avg)
      result += (r - a[i].second) * a[i].first, sum += (r - a[i].second);
    else {
      result += (avg - sum) * a[i].first;
      sum += (avg - sum);
      break;
    }
  }
  cout << result;
  return 0;
}
