#include <bits/stdc++.h>
using namespace std;
int mod1 = int(1e9) + 7;
pair<long long, long long> ess[100100];
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long ssum = 0;
  for (int i = 0; i < (int)(n); ++i) {
    long long a, b;
    cin >> a >> b;
    ess[i] = make_pair(b, r - a);
    ssum += a;
  }
  sort(ess, ess + n);
  long long ans = 0;
  for (int i = 0; i < (int)(n); ++i) {
    if (ssum >= avg * n) break;
    long long points = min(avg * n - ssum, ess[i].second);
    ssum += points;
    ans += points * ess[i].first;
  }
  cout << ans << endl;
  return 0;
}
