#include <bits/stdc++.h>
using namespace std;
struct node {
  long long a;
  long long b;
} c[100100];
bool cmp(node a, node b) { return a.b < b.b; }
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long temp = 0;
  for (long long i = 1; i <= n; i++) {
    scanf("%d %d", &c[i].a, &c[i].b);
    temp += c[i].a;
  }
  if (temp / n >= avg) {
    cout << 0 << endl;
    return 0;
  }
  sort(c + 1, c + n + 1, cmp);
  long long res = 0;
  for (long long i = 1; i <= n; i++) {
    temp += (r - c[i].a);
    res += (r - c[i].a) * c[i].b;
    if (temp / n >= avg) {
      if (temp / n == avg && temp % n == 0) {
        cout << res << endl;
        return 0;
      } else {
        res -= (temp - avg * n) * c[i].b;
        cout << res << endl;
        return 0;
      }
    }
  }
  return 0;
}
