#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 1e1;
long long n;
long long r, avg;
long long must, ans = 0, sum = 0;
pair<long long, long long> d[MAXN];
int main() {
  cin >> n >> r >> avg;
  long long x, y;
  for (long long i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &x, &y);
    sum += x;
    d[i] = make_pair(y, x);
  }
  must = max(n * avg - sum, 1LL * 0);
  sort(d + 1, d + n + 1);
  long long i = 1;
  while (must) {
    ans += min(must, r - d[i].second) * d[i].first;
    must -= min(must, r - d[i].second);
    i++;
  }
  cout << ans;
}
