#include <bits/stdc++.h>
using namespace std;
const int dx[] = {0, -1, 0, 1};
const int dy[] = {1, 0, -1, 0};
vector<pair<int, int> > v;
long long sum, ans;
int main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long need = avg * n;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    v.push_back(make_pair(b, a));
    sum += a;
  }
  sort(v.begin(), v.end());
  long long i = 0;
  while (sum < avg * n) {
    long long tmp = min(avg * n - sum, r - v[i].second);
    ans += tmp * v[i].first;
    sum += tmp;
    i++;
  }
  cout << ans;
}
