#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, r, avg, a, b, s = 0, x = 0, h = 0, re = 0;
  cin >> n >> r >> avg;
  pair<int, int> arr[n];
  for (int i = 0; i < n; ++i) {
    cin >> a >> b;
    if (a < r) {
      arr[h].first = b;
      arr[h].second = a;
      h++;
    }
    s += a;
  }
  x = (n * avg) - s;
  if (x <= 0) {
    cout << 0;
    return 0;
  }
  sort(arr, arr + h);
  for (int i = 0; i < h; ++i) {
    b = arr[i].first;
    s = r - arr[i].second;
    if (x >= s) {
      x -= s;
      re += b * s;
    } else {
      re += x * b;
      break;
    }
  }
  cout << re;
}
