#include <bits/stdc++.h>
using namespace std;
const int OO = (int)1e6;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool srt2(pair<int, pair<int, int>> a, pair<int, pair<int, int>> b) {
  return a.first < b.first;
}
bool srt(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  unsigned long long n, r, avg, sol = 0;
  unsigned long long max;
  cin >> n >> r >> avg;
  max = n * avg;
  vector<pair<int, int>> a;
  for (unsigned long long i = (0); i < (unsigned long long)(n); ++i) {
    int v, c;
    cin >> c >> v;
    a.push_back(make_pair(v, c));
  }
  sort(((a).begin()), ((a).end()), srt);
  unsigned long long sum = 0;
  for (unsigned long long i = (0); i < (unsigned long long)(n); ++i) {
    sum += a[i].second;
  }
  for (unsigned long long i = (0); i < (unsigned long long)(n); ++i) {
    if (sum >= max) break;
    unsigned long long ki = r - a[i].second;
    unsigned long long jj = ((ki) <= max - sum) ? (ki) : max - sum;
    sol += jj * a[i].first;
    sum += jj;
  }
  cout << sol;
}
