#include <bits/stdc++.h>
using namespace std;
struct _ {
  ios_base::Init i;
  _() {
    cin.sync_with_stdio(0);
    cin.tie(0);
  }
} _;
const int maxn = 100000;
pair<int, int> subject[maxn];
int main() {
  int n;
  long long maxScore, average;
  cin >> n >> maxScore >> average;
  average *= n;
  long long totalScore = 0;
  for (int i = 0; i < n; ++i) {
    cin >> subject[i].second >> subject[i].first;
    totalScore += subject[i].second;
  }
  sort(subject, subject + n);
  long long cost = 0;
  int i = 0;
  while (totalScore < average)
    for (int i = 0; totalScore < average; ++i)
      if (subject[i].second < maxScore) {
        long long scoreIncrease =
            min(maxScore - subject[i].second, average - totalScore);
        cost += scoreIncrease * subject[i].first;
        totalScore += scoreIncrease;
      }
  cout << cost << endl;
  return 0;
}
