#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q, avg, g = {}, i, j, k, n, m, z, l, r;
  pair<long long, long long> a[100500];
  scanf("%I64d %I64d %I64d", &n, &r, &avg);
  for (i = 0; i < n; i++) {
    scanf("%I64d %I64d", &a[i].second, &a[i].first);
    g += a[i].second;
  }
  j = 0;
  if (g == avg * n) {
    printf("%lld", j);
    return 0;
  }
  z = avg * n - g;
  sort(a, a + n);
  l = 0;
  j = 0;
  while (z > 0) {
    q = min(z, r - a[l].second);
    z -= q;
    j += a[l].first * q;
    l++;
  }
  printf("%lld", j);
}
