#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const int mod = 1e9 + 7;
pair<long long, long long> a[100005];
bool comp(pair<long long, long long> x, pair<long long, long long> y) {
  return x.second < y.second;
}
int main() {
  ios_base::sync_with_stdio(0);
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long need = n * avg, sum = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
    sum += a[i].first;
  }
  sort(a, a + n, comp);
  long long ans = 0, i = 0;
  while (sum < need) {
    ans += a[i].second * (min(r - a[i].first, need - sum));
    sum += min(r - a[i].first, need - sum);
    i++;
  }
  cout << ans << endl;
}
