#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg, x, y, sum = 0;
  cin >> n >> r >> avg;
  vector<pair<int, int> > v;
  for (long long i = 1; i <= n; i++) {
    cin >> x >> y;
    sum += x;
    v.push_back(make_pair(y, x));
  }
  long long req = (n * avg) - sum;
  sort(v.begin(), v.end());
  long long i = 0, ans = 0;
  while (req > 0) {
    long long t = min(req, r - v[i].second);
    ans += t * (v[i].first);
    req -= t;
    i++;
    if (req == 0) break;
  }
  cout << ans;
  return 0;
}
