#include <bits/stdc++.h>
using namespace std;
bool sortin(const pair<long long int, long long int> &e,
            const pair<long long int, long long int> &f) {
  return (e.second <= f.second);
}
long long int i, j, k, l, m, n, c, p, q, ts, mn = 10e17;
long long int a[250002], b[250002], x[250002];
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  };
  cin >> n;
  cin >> m;
  cin >> k;
  l = k * n;
  pair<long long int, long long int> pr[n + 2];
  for (long long int i = 0; i <= n - 1; i++) {
    cin >> pr[i].second;
    cin >> pr[i].first;
    c += pr[i].second;
  }
  l -= c;
  if (l <= 0) {
    cout << 0;
    return 0;
  }
  sort(pr, pr + n);
  for (long long int i = 0; i <= n - 1; i++) {
    p += min(m - pr[i].second, l) * pr[i].first;
    l -= min(m - pr[i].second, l);
    if (l <= 0) {
      cout << p;
      return 0;
    }
  }
  cout << p;
}
