#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long>> v;
long long n, r, avg;
signed main() {
  cin >> n >> r >> avg;
  v.resize(n);
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    v[i] = make_pair(b, a);
    sum += a;
  }
  long long x = avg * n - sum;
  sort(v.begin(), v.end());
  long long cnt = 0;
  long long now = 0;
  for (auto i : v) {
    long long kek = min(r - i.second, x - now);
    cnt += kek * i.first;
    now += kek;
  }
  if (cnt < 0)
    cout << 0;
  else
    cout << cnt;
  return 0;
}
