#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k, av, sum = 0, su = 0;
  cin >> n >> k >> av;
  vector<vector<int> > v(n, vector<int>(2));
  for (int i = 0; i < n; i++) {
    int j, l;
    cin >> j >> l;
    sum += j;
    v[i][0] = l, v[i][1] = j;
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n && sum / n < av; i++) {
    if (v[i][1] == k) continue;
    long long int l = k - v[i][1];
    long long int ll = (n * av) - sum;
    l = min(l, ll);
    su += (l * v[i][0]);
    sum += l;
  }
  cout << su << endl;
  return 0;
}
