#include <bits/stdc++.h>
using namespace std;
static long long m1[1000000], m2[1000000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, r, k, res = 0;
  cin >> n >> r >> k;
  k *= n;
  priority_queue<pair<long long, long long>,
                 vector<pair<long long, long long> >,
                 greater<pair<long long, long long> > >
      pq;
  for (long long i = 0; i < n; ++i) {
    cin >> m1[i] >> m2[i];
    k -= m1[i];
    pq.push(make_pair(m2[i], r - m1[i]));
  }
  while (1) {
    if (k <= 0) break;
    res += pq.top().first * min(k, (long long)pq.top().second);
    k -= pq.top().second;
    pq.pop();
  }
  cout << res << endl;
  return 0;
}
