#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
long long read() {
  long long ret = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  for (; ch >= '0' && ch <= '9'; ch = getchar()) ret = ret * 10 + ch - '0';
  return ret;
}
pair<long long, long long> a[N];
int main() {
  long long n = read(), r = read(), avg = read();
  long long sum = avg * n;
  long long cur = 0;
  for (int i = 0; i < n; i++) {
    a[i].first = read(), a[i].second = read();
    cur += a[i].first;
  }
  if (sum <= cur) {
    puts("0");
    return 0;
  }
  sum -= cur;
  sort(a, a + n,
       [](pair<long long, long long> p, pair<long long, long long> q) {
         return p.second < q.second;
       });
  cur = 0;
  long long ans = 0;
  for (long long i = 0; i < n && cur < sum;) {
    if (a[i].first >= r)
      i++;
    else {
      long long tmp = min(r - a[i].first, sum - cur);
      ans += tmp * a[i].second;
      a[i].first += tmp;
      cur += tmp;
    }
  }
  cout << ans << endl;
}
