#include <bits/stdc++.h>
using namespace std;
long long n, r, avg;
pair<long long, long long> a[100005];
long long sum;
long long target_sum;
int main() {
  cin >> n >> r >> avg;
  target_sum = n * avg;
  for (int i = 0; i < n; i++) {
    cin >> a[i].second >> a[i].first;
    sum += a[i].second;
  }
  sort(a, a + n);
  long long result = 0;
  for (int i = 0; i < n; i++) {
    if (sum >= target_sum) break;
    long long num = min(target_sum - sum, r - a[i].second);
    result += num * a[i].first;
    sum += num;
  }
  cout << result << endl;
}
