#include <bits/stdc++.h>
using namespace std;
long long int a[200005], b[200005];
long long int n, k, l, i, w, j, x, y, d, c, ans, mx, in1, in2, r, t;
pair<long long int, int> p[100005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> r >> t;
  for (i = 0; i < n; i++) {
    cin >> x >> y;
    c += x;
    p[i] = {y, x};
  }
  c = n * t - c;
  sort(p, p + n);
  i = 0;
  while (c > 0) {
    if (p[i].second < r) {
      c = c - r + p[i].second;
      if (c < 0) {
        c = c + r - p[i].second;
        ans += p[i].first * (c);
        c = 0;
      } else
        ans += p[i].first * (r - p[i].second);
    }
    i++;
  }
  cout << ans;
}
