#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, MOD = 1e9 + 7;
long long int t, n, x, m, a[N], ans, c, mn = 1e9, f, k, y, sum, r, avg;
long long int q = 5, c2 = 0, b[N];
vector<pair<long long int, long long int>> v;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  cin >> n >> r >> avg;
  long long int mark = 0;
  for (int i = 0; i < n; i++) {
    pair<long long int, long long int> p;
    cin >> x >> y;
    mark += x;
    p = {y, x}, v.push_back(p);
  }
  sort(v.begin(), v.end());
  int i = 0;
  while (mark < avg * n) {
    long long int tmp = min(avg * n - mark, r - v[i].second);
    mark += tmp;
    c += tmp * v[i].first;
    i++;
  }
  cout << c << '\n';
  return 0;
}
