#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r, avg;
  scanf("%d%d%d", &n, &r, &avg);
  long long need = (long long)avg * n;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    need -= a;
    v.push_back(pair<int, int>(b, a));
  }
  sort(v.begin(), v.end());
  long long ans = 0;
  for (int i = 0; i < n; i++)
    if (need > 0) {
      long long tem = r - v[i].second;
      int pega = min(tem, need);
      need -= pega;
      ans += (long long)v[i].first * pega;
    }
  printf("%I64d\n", ans);
}
