#include <bits/stdc++.h>
using namespace std;
const int oo = 1e5 + 10;
long long n, r, avg, dif, ans;
pair<long long, long long> p[oo];
int main() {
  cin >> n >> r >> avg;
  for (int i = 0; i < n; i++)
    cin >> p[i].second >> p[i].first, dif += p[i].second;
  dif -= n * avg;
  dif *= (-1);
  if (dif < 1) {
    cout << 0;
    return 0;
  }
  sort(p, p + n);
  long long i = 0, x;
  while (dif)
    x = min(dif, r - p[i].second), dif -= x, ans += x * p[i].first, i++;
  cout << ans;
  return 0;
}
