#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg;
  scanf("%lld %lld %lld", &n, &r, &avg);
  vector<pair<long long, long long> > vec;
  long long need = avg * n;
  for (int i = 1; i <= n; i++) {
    long long a, b;
    scanf("%lld %lld", &a, &b);
    need -= a;
    vec.push_back(make_pair(b, a));
  }
  if (need < 0) {
    printf("0\n");
    return 0;
  }
  sort(vec.begin(), vec.end());
  long long res = 0;
  for (int i = 0; i < vec.size(); i++) {
    long long canAdd = min(need, r - vec[i].second);
    res += canAdd * vec[i].first;
    need -= canAdd;
  }
  printf("%lld\n", res);
  return 0;
}
