#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << "\n";
  err(++it, args...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin.tie(NULL);
  long long int n, m, i, j, k, r, avg, ans = 0, cnt = 0;
  cin >> n >> r >> avg;
  avg *= n;
  long long int ai, bi;
  vector<pair<long long int, long long int> > vp;
  for (i = 0; i < n; i++) {
    cin >> ai >> bi;
    vp.push_back(make_pair(bi, ai));
    cnt += ai;
  }
  sort(vp.begin(), vp.end());
  for (auto it : vp) {
    if (cnt + (r - it.second) >= avg) {
      long long int extra = max(0LL, avg - cnt);
      ans += it.first * extra;
      break;
    } else {
      ans += it.first * (r - it.second);
      cnt += (r - it.second);
    }
  }
  cout << ans << "\n";
  return 0;
}
