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