#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg, i, sum1, sum2 = 0, ans, x, sum = 0;
  cin >> n >> r >> avg;
  pair<long long, long long> pi[n];
  sum1 = avg * n;
  for (i = 0; i < n; i++) {
    cin >> pi[i].second >> pi[i].first;
    sum2 = sum2 + pi[i].second;
  }
  sort(pi, pi + n);
  ans = sum1 - sum2;
  if (ans <= 0)
    cout << "0" << endl;
  else {
    for (i = 0; i < n; i++) {
      if (ans == 0) break;
      x = r - pi[i].second;
      if (x > 0) {
        if (x >= ans) {
          sum = sum + ans * pi[i].first;
          ans = 0;
        } else {
          ans = ans - x;
          sum = sum + x * pi[i].first;
        }
      }
    }
    cout << sum << endl;
  }
}
