#include <bits/stdc++.h>
using namespace std;
bool comp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
pair<long long, long long> grades[200005];
int main() {
  std::ios::sync_with_stdio(false);
  long long n, rez = 0, mx, avg, cnt = 0;
  cin >> n >> mx >> avg;
  for (int i = 0; i < n; i++) {
    cin >> grades[i].first >> grades[i].second;
    cnt += grades[i].first;
  }
  sort(grades, grades + n, comp);
  int i = 0;
  while (cnt < avg * n) {
    long long pom = min(avg * n - cnt, mx - grades[i].first);
    rez += pom * grades[i].second;
    cnt += pom;
    i++;
  }
  cout << rez;
  return 0;
}
