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