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