#include <bits/stdc++.h>
using namespace std;
inline void boost() {
  ios_base::sync_with_stdio();
  cin.tie(0);
  cout.tie(0);
}
const long long MAXN = 1e5 + 123;
const long long inf = 1e9 + 123;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
pair<long long, long long> p[MAXN];
int main() {
  boost();
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long sum = 0, cntr = 0;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].second >> p[i].first;
    sum += p[i].second;
  }
  avg *= n;
  if (avg <= sum) {
    cout << "0";
    return 0;
  }
  avg -= sum;
  sort(p + 1, p + 1 + n);
  for (int i = 1; i <= n; i++) {
    if (r - p[i].second <= avg) {
      cntr += ((r - p[i].second) * p[i].first);
      avg -= (r - p[i].second);
    } else {
      cntr += (avg * p[i].first);
      avg = 0;
    }
  }
  cout << cntr;
  exit(0);
}
