#include <bits/stdc++.h>
using namespace std;
long long squ(long long x) { return (x * x); }
bool cmpare(const pair<long long, long long> &a,
            const pair<long long, long long> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, r, avg, tot = 0, i, j, ans = 0, k;
  vector<pair<long, long>> in;
  cin >> n >> r >> avg;
  in.resize(n);
  for (i = 0; i < n; i++) {
    cin >> in[i].first >> in[i].second;
    tot += in[i].first;
  }
  if (tot >= (avg * n)) {
    cout << ans;
    return 0;
  }
  k = (avg * n) - tot;
  sort(in.begin(), in.end(), cmpare);
  for (i = 0; i < n && k > 0; i++) {
    j = (r - in[i].first);
    if (j >= k) {
      ans += (k * in[i].second);
      k = 0;
    } else {
      ans += (j * in[i].second);
      k -= j;
    }
  }
  cout << ans;
  return 0;
}
