#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000100;
const int MOD = 1000000000 + 7;
const int INF = (1 << 30);
const double eps = 1e-8;
const double pi = 3.1415926535898;
const double e = 2.718281828459;
inline int getint() {
  int c;
  while (c = getchar(), (c < '0' || c > '9') && (c != '-') && (c != EOF))
    ;
  if (c == EOF) {
    return -1;
  }
  bool flag = (c == '-');
  if (flag) {
    c = getchar();
  }
  int x = 0;
  while (c >= '0' && c <= '9') {
    x = (x << 3) + x + x + c - '0';
    c = getchar();
  }
  return flag ? -x : x;
}
inline long long getll() {
  long long c;
  while (c = getchar(), (c < '0' || c > '9') && (c != '-') && (c != EOF))
    ;
  if (c == EOF) {
    return -1;
  }
  bool flag = (c == '-');
  if (flag) {
    c = getchar();
  }
  long long x = 0;
  while (c >= '0' && c <= '9') {
    x = (x << 3) + x + x + c - '0';
    c = getchar();
  }
  return flag ? -x : x;
}
inline void output(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  int len = 0, buf[20];
  while (x) {
    buf[len++] = x % 10;
    x /= 10;
  }
  if (!len) {
    buf[len++] = 0;
  }
  while (len--) {
    putchar(buf[len] + '0');
  }
  putchar('\n');
}
inline void output(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  long long len = 0, buf[20];
  while (x) {
    buf[len++] = x % 10;
    x /= 10;
  }
  if (!len) {
    buf[len++] = 0;
  }
  while (len--) {
    putchar(buf[len] + '0');
  }
  putchar('\n');
}
struct node {
  int x, y;
} a[maxn];
bool cmp(node a, node b) { return a.y < b.y; }
int main() {
  ios_base::sync_with_stdio(0);
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].x >> a[i].y;
    ans += a[i].x;
  }
  if (ans >= avg * n) {
    printf("0\n");
    return 0;
  }
  sort(a + 1, a + n + 1, cmp);
  ans = avg * n - ans;
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    long long t = r - a[i].x;
    if (ans - t >= 0) {
      ans -= t;
      res += t * a[i].y;
    } else {
      res += ans * a[i].y;
      break;
    }
  }
  cout << res << endl;
}
