#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i;
  cin >> n;
  long long r;
  cin >> r;
  long long avg;
  cin >> avg;
  long long p, a;
  long long sum = 0;
  long long z = 0;
  vector<pair<long long, long long>> vec;
  for (i = 0; i < n; i++) {
    cin >> p >> a;
    sum += p;
    vec.push_back(make_pair(a, p));
  }
  sort(vec.begin(), vec.end());
  long long f = avg * n - sum;
  if (f <= 0) {
    cout << "0";
  } else {
    for (i = 0; i < n; i++) {
      int b = r - vec[i].second;
      if (f >= b) {
        z += b * vec[i].first;
        f = f - b;
      } else if (f < b) {
        z += (f)*vec[i].first;
        f = 0;
      }
      if (f == 0) {
        cout << z;
        break;
      }
    }
  }
}
