#include <bits/stdc++.h>
using namespace std;
struct node {
  long long int a;
  long long int b;
};
node p[100005];
bool comp(node x, node y) {
  if (x.b < y.b) return true;
  return false;
}
int main() {
  long long int n, r, avg;
  cin >> n >> r >> avg;
  long long int s = 0;
  for (int i = (0); i < (n); ++i) {
    cin >> p[i].a >> p[i].b;
    s += p[i].a;
  }
  long long int cc = avg * n;
  if (s >= cc)
    cout << 0 << endl;
  else {
    long long int to = avg * n;
    long long int add = to - s;
    long long int count = 0;
    sort(p, p + n, comp);
    for (int j = (0); j < (n); ++j) {
      if (add == 0) break;
      long long int maxim = r - p[j].a;
      if (r < p[j].a) continue;
      if (add > maxim) {
        add = add - maxim;
        count += p[j].b * maxim;
      } else {
        count += add * p[j].b;
        add = 0;
      }
    }
    cout << count << endl;
  }
  return 0;
}
