#include <bits/stdc++.h>
using namespace std;
const int XI = INT_MAX, NI = INT_MIN, MOD = 1e9 + 7;
long long n, r, avg, ans, sum;
pair<long long, long long> pr[101234];
int main() {
  scanf("%lld%lld%lld", &n, &r, &avg);
  for (int i = 0; i < n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    pr[i] = make_pair(y, x);
    sum += x;
  }
  sort(pr, pr + n);
  int i = 0;
  while (avg * n > sum) {
    if (avg * n >= sum + (r - pr[i].second)) {
      sum += r - pr[i].second;
      ans += (r - pr[i].second) * pr[i].first;
    } else {
      long long x = (avg * n) - sum;
      sum += x;
      ans += x * pr[i].first;
    }
    i++;
  }
  cout << ans << endl;
}
