#include <bits/stdc++.h>
using namespace std;
struct S {
  long long int x, y;
} a[100005];
bool comp(S A, S B) { return A.y < B.y; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int n, r, avg, total = 0, ans = 0;
  cin >> n >> r >> avg;
  for (int i = 0; i < n; i++) {
    cin >> a[i].x >> a[i].y;
    total += a[i].x;
  }
  sort(a, a + n, comp);
  long long int av = total / n;
  if (av < avg) {
    long long int cn = (n * avg) - total;
    for (int i = 0; i < n; i++) {
      if (cn == 0) break;
      long long int ok = min(r - a[i].x, cn);
      cn -= ok;
      ans += (ok * a[i].y);
    }
    cout << ans << endl;
  } else
    cout << 0 << endl;
  return 0;
}
