#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int main() {
  long long n, r, avg, sum = 0, a, b;
  cin >> n >> r >> avg;
  v = vector<pair<int, int> >(n);
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    sum += a;
    v[i] = make_pair(b, a);
  }
  sort(v.begin(), v.end());
  long long na = (long long)n * avg;
  int i = 0;
  long long ans = 0;
  long long diff = na - sum;
  while (diff > 0) {
    ans += (long long)v[i].first * min(r - v[i].second, diff);
    diff -= min(r - v[i].second, diff);
    i++;
  }
  cout << ans << endl;
  return 0;
}
