#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long int n, r, avg, i, j, sum = 0;
  cin >> n >> r >> avg;
  pair<long long int, long long int> arr[n];
  for (i = 0; i < n; i++) {
    cin >> arr[i].second >> arr[i].first;
    sum += arr[i].second;
  }
  long long int c = sum / n;
  if (c >= avg) {
    cout << "0";
    return 0;
  }
  sort(arr, arr + n);
  long long int ans = 0;
  i = 0;
  long long int tot = avg * n;
  while (c < avg) {
    long long int d = r - arr[i].second;
    long long int p = arr[i].first;
    if (sum + d <= tot) {
      sum += d;
      c = sum / n;
      ans += d * p;
      i++;
    } else {
      ans += (tot - sum) * p;
      break;
    }
  }
  cout << ans;
}
