#include <bits/stdc++.h>
using namespace std;
class exam {
 public:
  long long f, s;
};
bool comp(exam e1, exam e2) {
  if (e1.s == e2.s) {
    return e1.f < e2.f;
  }
  return e1.s < e2.s;
}
void solve() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long tot = 0;
  exam grades[n];
  for (int i = 0; i < n; i++)
    cin >> grades[i].f >> grades[i].s, tot += grades[i].f;
  sort(grades, grades + n, comp);
  if (tot / n >= avg) {
    cout << 0 << endl;
    return;
  }
  long long ans = 0;
  long long need = avg * n - tot;
  for (int i = 0; i < n; i++) {
    ans += min((long long)need * grades[i].s,
               (long long)(r - grades[i].f) * grades[i].s);
    need -= min((long long)need, (long long)(r - grades[i].f));
    if (need <= 0) {
      break;
    }
  }
  cout << ans << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
