#include <bits/stdc++.h>
using namespace std;
bool check(long long n, long long p) { return (n & (1 << p)); }
long long status[1000000 + 1] = {0};
int prime() {
  long long l = long(sqrt(1000000));
  long long i, j;
  for (i = 3; i <= l; i += 2) {
    if (check(status[i >> 5], i % 31) == 0) {
      for (j = i * i; j <= 1000000; j += 2 * i) {
        status[j >> 5] = (status[j >> 5] | (1 << (j % 31)));
      }
    }
  }
  return 0;
}
int main() {
  pair<long long, long long> ar[100009];
  long long n, r, avg, sum, a, b;
  cin >> n >> r >> avg;
  sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    sum += a;
    ar[i] = make_pair(b, r - a);
  }
  long long p = sum / n;
  if (p >= avg)
    cout << "0" << endl;
  else {
    long long req = avg * n - sum;
    sort(ar, ar + n);
    sum = 0;
    long long ans = 0;
    for (int i = 0; i < n; i++) {
      if (sum + ar[i].second < req) {
        ans += (ar[i].second * ar[i].first);
        sum += ar[i].second;
      } else {
        ans += ((req - sum) * ar[i].first);
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
