#include <bits/stdc++.h>
using namespace std;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
char dir[4] = {'D', 'R', 'U', 'L'};
const long long maxN = 1e3 + 5;
void solve() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > v(n);
  long long totalM = 0;
  for (long long i = 0; i < n; i++)
    cin >> v[i].first >> v[i].second, totalM += v[i].first;
  sort(v.begin(), v.end(),
       [](pair<long long, long long> a, pair<long long, long long> b) {
         if (a.second == b.second)
           return a.first < b.first;
         else
           return a.second < b.second;
       });
  long long avgM = avg * n;
  long long reqM = avgM - totalM;
  if (reqM <= 0) {
    cout << 0 << endl;
  } else {
    long long cnt = 0;
    for (long long i = 0; i < n; i++) {
      if (reqM == 0) break;
      long long val = min(reqM, r - v[i].first);
      reqM -= val;
      cnt += val * v[i].second;
    }
    cout << cnt << endl;
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(5);
  long long T = 1;
  while (T--) {
    solve();
  }
}
