#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
const long long mod = 1e9 + 7, INF = 1 << 30;
long long n, r, avg, tl = 0, res = 0;
vector<pair<long long, long long> > a;
void init(void) {
  scanf("%I64d%I64d%I64d", &n, &r, &avg);
  for (int i = 1; i <= n; i++) {
    pair<long long, long long> x;
    scanf("%I64d%I64d", &x.second, &x.first);
    tl += x.second;
    a.push_back(x);
  }
  sort(a.begin(), a.end());
}
void process(void) {
  long long it = 0, tar = avg * n;
  while (tl < tar) {
    if (a[it].second < r) {
      long long b = min(tar - tl, r - a[it].second);
      tl += b;
      a[it].second += b;
      res += a[it].first * b;
    }
    it++;
  }
  printf("%I64d", res);
}
int main(void) {
  init();
  process();
  return 0;
}
