#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long>> v;
  long long total = 0;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    total += a;
    v.push_back(make_pair(b, a));
  }
  long long target = avg * n;
  long long before = total;
  sort(v.begin(), v.end());
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (total >= target) break;
    long long here = min(r - v[i].second, target - total);
    ans += v[i].first * here;
    total += here;
  }
  cout << ans;
  return 0;
}
