#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long>> v;
  long long tot = 0;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    tot = tot + a;
    v.push_back(make_pair(b, a));
  }
  long long ans = 0;
  if (tot >= avg * n) {
    ans = 0;
  } else {
    long long x = (avg * n) - tot;
    sort(v.begin(), v.end());
    long long i = 0;
    while (x > 0 and i < v.size()) {
      if (v[i].second != r) {
        if (x <= r - v[i].second) {
          ans = ans + (x * v[i].first);
          x = x - x;
        } else {
          x = x - (r - v[i].second);
          ans = ans + ((r - v[i].second) * v[i].first);
        }
      }
      i++;
    }
  }
  cout << ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  T = 1;
  while (T--) {
    solve();
  }
}
