#include <bits/stdc++.h>
using namespace std;
const int MAX = 105;
int a[MAX][MAX], ans[MAX][MAX];
int main() {
  ios::sync_with_stdio(false);
  long long n, sum = 0, r, avg;
  pair<int, int> p[100010];
  cin >> n >> r >> avg;
  sum = avg * n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].second >> p[i].first;
    sum -= p[i].second;
  }
  sort(p, p + n);
  long long cost = 0, i = 0, s = 0;
  for (int i = 0; sum > 0; i++) {
    s = min(r - p[i].second, sum);
    cost += min(r - p[i].second, sum) * p[i].first;
    sum -= s;
  }
  cout << cost;
  return 0;
}
