#include <bits/stdc++.h>
using namespace std;
struct Exam {
  int a, b;
  friend bool operator<(const Exam& e1, const Exam& e2) {
    if (e1.b != e2.b)
      return e1.b < e2.b;
    else
      return e1.a < e2.a;
  }
} exams[100005];
int main() {
  int n, r, avg;
  scanf("%d %d %d", &n, &r, &avg);
  long long total = (long long)avg * n;
  for (int i = 0; i < n; ++i)
    scanf("%d %d", &exams[i].a, &exams[i].b), total -= exams[i].a;
  if (total <= 0)
    printf("0\n");
  else {
    sort(exams, exams + n);
    long long ans = 0;
    for (int i = 0; i < n && total; ++i) {
      long long cnt = r - exams[i].a;
      if (cnt > total) cnt = total;
      ans += cnt * exams[i].b;
      total -= cnt;
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
