#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, r, a;
  cin >> n >> r >> a;
  long long int x, y;
  vector<pair<long long int, long long int>> g;
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    sum += x;
    g.push_back({y, x});
  }
  sort(g.begin(), g.end());
  long long int need = ((a * n) - sum);
  long long int ans = 0;
  while (need > 0) {
    for (long long int i = 0; i < g.size(); i++) {
      if (g[i].second < r) {
        if (need > r - g[i].second) {
          ans += g[i].first * (r - g[i].second);
          need -= r - g[i].second;
        } else {
          ans += need * g[i].first;
          need = 0;
        }
      }
    }
  }
  cout << ans << endl;
}
