#include <bits/stdc++.h>
using namespace std;
const int cmx = 1e5 + 5;
int n, r, avg;
pair<int, int> a[cmx];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> r >> avg;
  for (int i = 0; i < n; i++) cin >> a[i].second >> a[i].first;
  sort(a, a + n);
  long long cur = 0;
  long long tot = 1LL * n * avg;
  for (int i = 0; i < n; i++) cur += a[i].second;
  long long ans = 0;
  int i = 0;
  while (1) {
    if (cur >= tot) {
      cout << ans << '\n';
      return 0;
    }
    int x = min(1LL * (r - a[i].second), tot - cur);
    cur += x;
    ans += 1LL * x * a[i].first;
    i++;
  }
  cout << ans << '\n';
  return 0;
}
