#include <bits/stdc++.h>
using namespace std;
int dx[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dy[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int xChange[] = {0, 1, 0, -1};
int yChange[] = {1, 0, -1, 0};
bool compare(const pair<long long, long long>& i,
             const pair<long long, long long>& j) {
  if (i.second == j.second) return i.first < j.first;
  return i.second < j.second;
}
const int N = (int)1e5 + 5;
pair<int, int> pa[N];
long long ans, sum, average;
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL);
  long long n, Max, avg;
  cin >> n >> Max >> avg;
  for (int i = 0; i < n; i++)
    cin >> pa[i].first >> pa[i].second, sum += pa[i].first;
  sort(pa, pa + n, compare);
  average = sum / n;
  if (average >= avg) {
    cout << 0;
    return 0;
  }
  long long points;
  points = (avg * n) - sum;
  for (int i = 0; i < n; i++) {
    if (!points || average == avg) break;
    if (pa[i].first < Max) {
      long long x = Max - pa[i].first;
      x = min(x, points);
      long long y = x * pa[i].second;
      sum -= pa[i].first;
      sum += (pa[i].first + x);
      points -= x;
      ans += y;
    }
  }
  cout << ans;
  return 0;
}
