#include <bits/stdc++.h>
using namespace std;
long long int n, avg, r;
long long int arr[100005];
pair<long long int, long long int> p[100005];
bool comparison(const pair<long long int, long long int> &p1,
                const pair<long long int, long long int> &p2) {
  if (p1.first < p2.first) {
    return true;
  }
  return false;
}
int main() {
  long long int i, j, a, b, c, d, ans;
  cin >> n >> r >> avg;
  c = 0;
  for (i = 1; i <= n; ++i) {
    cin >> a >> b;
    p[i].second = a;
    p[i].first = b;
    c += a;
  }
  long long int req = avg * n - c;
  sort(&p[1], &p[n + 1], comparison);
  ans = 0;
  if (req > 0) {
    for (i = 1; i <= n; ++i) {
      d = r - p[i].second;
      if (d >= req) {
        ans += p[i].first * req;
        break;
      } else {
        ans += p[i].first * d;
        req -= d;
      }
    }
  }
  cout << ans;
  return 0;
}
