#include <bits/stdc++.h>
using namespace std;
int n;
long long r, avg;
long long cnt[1000200];
long long tot;
long long curr = 0;
long long ans = 0;
void read() {
  scanf("%d %I64d %I64d", &n, &r, &avg);
  for (int i = 1; i <= n; i++) {
    long long a;
    int b;
    scanf("%I64d %d", &a, &b);
    cnt[b] += (r - a);
    curr += a;
  }
}
void solve() {
  tot = 1ll * avg * n;
  curr = tot - curr;
  if (curr <= 0) {
    printf("0");
    return;
  }
  for (int i = 1; i <= 1e6; i++) {
    if (cnt[i] < curr) {
      ans += cnt[i] * i;
      curr -= cnt[i];
    } else {
      ans += curr * i;
      break;
    }
  }
  printf("%I64d", ans);
}
int main() {
  read();
  solve();
}
