#include <bits/stdc++.h>
using namespace std;
const int MAX = 100005;
pair<int, int> p[MAX];
int main() {
  ios::sync_with_stdio(false);
  int n, r, k;
  cin >> n >> r >> k;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> p[i].second >> p[i].first;
    sum += p[i].second;
  }
  long long need = 1LL * n * k;
  if (sum >= need) {
    cout << 0 << endl;
    return 0;
  }
  need -= sum;
  sort(p, p + n);
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    int has = r - p[i].second;
    if (need > has) {
      ans += 1LL * has * p[i].first;
      need -= has;
    } else {
      ans += 1LL * need * p[i].first;
      need = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
