#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, av;
  cin >> n;
  pair<long long, long long> p[n + 1];
  long long r;
  cin >> r;
  cin >> av;
  long long s = n * av;
  for (int i = 0; i < n; i++) {
    cin >> p[i].second >> p[i].first;
    s -= p[i].second;
  }
  sort(p, p + n);
  long long k;
  long long ss = 0;
  for (int i = 0; s > 0; i++) {
    long long a = (r - p[i].second);
    k = min(a, s);
    ss += k * p[i].first;
    s -= k;
  }
  cout << ss << endl;
}
