#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 * 100 + 10;
vector<pair<long long, long long> > v;
int main() {
  int n, r, avg;
  long long sum = 0LL;
  scanf("%d %d %d", &n, &r, &avg);
  for (int i = 0; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    v.push_back(make_pair(b, a));
    sum += a;
  }
  long long ans = 0;
  sort(v.begin(), v.end());
  for (int i = 0; i < (int)(v).size(); i++) {
    if ((long long)sum >= (long long)avg * (int)(v).size()) break;
    long long maxadd = r - v[i].second;
    long long l = -1, rr = maxadd + 1;
    while (rr - l > 1) {
      long long mid = (rr + l) / 2;
      if ((long long)sum + mid >= (long long)avg * (int)(v).size()) {
        rr = mid;
      } else {
        l = mid;
      }
    }
    ans += (long long)max(0LL, min(rr, maxadd)) * v[i].first;
    sum += (long long)max(0LL, min(rr, maxadd));
  }
  printf("%lld\n", ans);
  return 0;
}
