#include <bits/stdc++.h>
using namespace std;
bool sortbysec(const pair<int, int>& a, const pair<int, int>& b) {
  return (a.second < b.second);
}
int main() {
  long long int n, r, a;
  cin >> n >> r >> a;
  long long int sum = a * n;
  vector<pair<long long int, long long int>> arr(n);
  for (long long int i = 0; i < n; i++) cin >> arr[i].first >> arr[i].second;
  sort(arr.begin(), arr.end(), sortbysec);
  long long int temp = 0;
  for (long long int i = 0; i < n; i++) temp += arr[i].first;
  if (temp >= sum)
    cout << 0 << endl;
  else {
    long long int res = sum - temp;
    long long int ans = 0;
    for (long long int i = 0; i < n; i++) {
      long long int k = r - arr[i].first;
      if (k <= res) {
        res = res - k;
        ans += (k * arr[i].second);
      } else if (k > res) {
        ans = ans + res * arr[i].second;
        break;
      }
    }
    cout << ans << endl;
  }
}
