#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int a, b, c;
  cin >> a >> b >> c;
  long long int e = 0;
  long long int d = a * c;
  vector<pair<long long int, long long int>> lol;
  for (int i = 0; i < a; i++) {
    int x, y;
    cin >> x >> y;
    lol.push_back({y, x});
    e += x;
  }
  d -= e;
  long long int k = 0;
  if (d > 0) {
    sort(lol.begin(), lol.end());
    for (int i = 0; i < a; i++) {
      int w = (b - lol[i].second);
      if (d > w) {
        k += w * lol[i].first;
        d -= w;
      } else {
        k += d * lol[i].first;
        d = 0;
      }
      if (d == 0) break;
    }
  }
  cout << k << "\n";
  return 0;
}
