#include <bits/stdc++.h>
using namespace std;
signed main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m, av;
  cin >> n >> m >> av;
  vector<pair<long long, long long> > v;
  long long s = 0;
  for (long long i = 0; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    s += a;
    v.push_back({b, a});
  }
  sort(v.begin(), v.end());
  long long ans = 0, j = 0;
  long long diff = av * n - s;
  while (diff > 0) {
    if (m - v[j].second <= diff) {
      diff = diff - (m - v[j].second);
      ans += (m - v[j].second) * v[j].first;
    } else {
      ans += diff * v[j].first;
      diff = 0;
    }
    j++;
  }
  cout << ans;
  return 0;
}
