#include <bits/stdc++.h>
using namespace std;
struct Node {
  long long a, b;
  bool operator<(const Node &i) const { return b < i.b; }
} node[100020];
int main() {
  long long n, r, avg;
  long long nowavg = 0;
  scanf("%I64d %I64d %I64d", &n, &r, &avg);
  for (int i = 0; i < n;
       scanf("%I64d %I64d", &node[i].a, &node[i].b), nowavg += node[i++].a)
    ;
  avg = avg * n;
  if (nowavg >= avg) {
    puts("0");
  } else {
    sort(node, node + n);
    long long ans = 0;
    for (int i = 0; i < n; i++) {
      long long p = min(r - node[i].a, avg - nowavg);
      ans += p * node[i].b;
      nowavg += p;
      if (nowavg >= avg) break;
    }
    printf("%I64d\n", ans);
  }
}
