#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
int main(void) {
  cout.tie(0);
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  long long n, r;
  long long avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long>> v(n);
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    sum += a;
    v[i].first = a;
    v[i].second = b;
  }
  sort(v.begin(), v.end(), cmp);
  long long res = 0;
  for (int i = 0; i < n && sum < avg * n; i++) {
    int inc = r - v[i].first;
    if (inc + sum <= avg * n) {
      sum += inc;
      res += inc * v[i].second;
    } else {
      res += (avg * n - sum) * v[i].second;
      break;
    }
  }
  cout << res << endl;
}
