#include <bits/stdc++.h>
using namespace std;
struct Node {
  int a, b;
} stu[100005];
int n, r, avg;
bool cmp(Node x, Node y) {
  if (x.b != y.b)
    return x.b < y.b;
  else
    return x.a < y.a;
}
int main() {
  long long sum, need;
  long long ans;
  while (scanf("%d%d%d", &n, &r, &avg) != EOF) {
    ans = sum = 0;
    need = (long long)n * (long long)avg;
    for (int i = 0; i < n; i++) {
      scanf("%d%d", &stu[i].a, &stu[i].b);
      sum += stu[i].a;
    }
    sort(stu, stu + n, cmp);
    need -= sum;
    if (need <= 0) {
      puts("0");
      continue;
    } else {
      for (int i = 0; i < n; i++) {
        long long temp;
        if (need >= r - stu[i].a) {
          need -= (r - stu[i].a);
          ans += (long long)(stu[i].b * (long long)(r - stu[i].a));
        } else {
          ans += ((long long)need * (long long)stu[i].b);
          break;
        }
      }
      printf("%I64d\n", ans);
    }
  }
  return 0;
}
