#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
#pragma GCC optimization("Ofast")
#pragma GCC optimization("unroll-loops")
int k, n;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  priority_queue<pair<long long int, long long int>,
                 vector<pair<long long int, long long int>>,
                 greater<pair<long long int, long long int>>>
      pq;
  long long int n, r, avg;
  cin >> n >> r >> avg;
  long long int sum = 0LL;
  for (int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    sum += x;
    x = r - x;
    if (x == 0) continue;
    pq.push(pair<long long int, long long int>(y, x));
  }
  sum = (avg * n) - sum;
  long long int ans = 0LL;
  while (sum > 0) {
    pair<long long int, long long int> a = pq.top();
    pq.pop();
    if (sum - a.second > 0) {
      sum -= a.second;
      ans += (a.first * a.second);
    } else {
      ans += (a.first * sum);
      sum = 0;
    }
  }
  cout << ans;
}
