#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
struct elem {
  long long a, b;
  elem(long long A = 0, long long B = 0) { a = A, b = B; }
} elems[100010];
long long n, l;
long long x, y;
long long r;
long long avg, yo;
bool cmp(elem x, elem y) { return x.b < y.b; }
long long b_search(long long a) {
  long long l = 0, r = a;
  while (r - l > 1) {
    long long temp = (l + r) / 2;
    if (yo + temp > avg)
      r = temp;
    else
      l = temp;
  }
  if (yo + l == avg) return l;
  return r;
}
int main() {
  scanf("%I64d%I64d%I64d", &n, &r, &avg);
  avg = avg * n;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &x, &y);
    elems[i] = elem(x, y);
    yo = yo + x;
  }
  sort(elems, elems + n, cmp);
  long long res = 0;
  if (yo >= avg) {
    printf("0");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (r <= elems[i].a) continue;
    if (yo + r - elems[i].a >= avg) {
      int temp = b_search(r - elems[i].a);
      res = res + elems[i].b * temp;
      yo += temp;
      break;
    } else {
      res = res + elems[i].b * (r - elems[i].a);
      yo += r - elems[i].a;
    }
  }
  printf("%I64d", res);
  return 0;
}
