#include <bits/stdc++.h>
const int INF = 0x7F7F7F7F;
const double EPS = 1e-10;
const long long mod7 = 1e9 + 7;
const long long mod9 = 1e9 + 9;
using namespace std;
inline long long rit() {
  long long f = 0, key = 1;
  char c;
  do {
    c = getchar();
    if (c == '-') key = -1;
  } while (c < '0' || c > '9');
  do {
    f = f * 10 + c - '0';
    c = getchar();
  } while (c >= '0' && c <= '9');
  return f * key;
}
inline void fprt(double f) { printf("%.08lf", f); }
void init() {}
const int Z = 100005;
int n;
long long r;
long long avg, now;
pair<int, int> p[Z];
void read() {
  n = rit(), r = rit(), avg = rit();
  avg = avg * n;
  for (int i = 0; i < n; ++i) {
    p[i].second = rit(), p[i].first = rit();
    now += p[i].second;
  }
}
void solve() {
  long long ans;
  long long f;
  sort(p, p + n);
  ans = 0;
  for (int i = 0; i < n; ++i) {
    f = max(0ll, min(r - p[i].second, avg - now));
    now += f;
    ans += f * p[i].first;
  }
  cout << ans << endl;
}
int main() {
  int nn = 1;
  while (nn--) {
    init(), read(), solve();
  }
  return 0;
}
