#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, r, avg, c_avg, left, sum = 0, count = 0, x, y;
  vector<pair<long long int, long long int> > v;
  cin >> n >> r >> avg;
  for (long long int i = 0; i < n; ++i) {
    cin >> x >> y;
    v.push_back(make_pair(y, x));
    sum += x;
  }
  c_avg = sum / n;
  if (c_avg >= avg) {
    cout << "0";
    return 0;
  }
  left = avg * n - sum;
  sort(v.begin(), v.end());
  for (long long int i = 0; i < n; ++i) {
    if (left <= 0) break;
    long long int c = r - v[i].second;
    if (c >= left) {
      count += v[i].first * left;
      break;
    } else {
      count += c * v[i].first;
      left -= c;
    }
  }
  cout << count;
  return 0;
}
