#include <bits/stdc++.h>
using namespace std;
pair<long long int, long long int> ar[200000];
int main() {
  long long int n, t, avg, i, val, ans, r;
  cin >> n >> r >> avg;
  val = 0;
  for (i = 0; i < n; i++) {
    cin >> ar[i].second;
    cin >> ar[i].first;
    val += (avg - ar[i].second);
  }
  if (val <= 0) {
    cout << "0";
  } else {
    sort(ar, ar + n);
    long long int p = 0;
    ans = 0;
    for (i = 0; i < n; i++) {
      if (ar[i].second < r) {
        p += r - ar[i].second;
        if (p > val) {
          p -= (r - ar[i].second);
          ans += (val - p) * ar[i].first;
          break;
        } else {
          ans += (r - ar[i].second) * ar[i].first;
        }
      }
    }
    cout << ans;
  }
}
