#include <bits/stdc++.h>
using namespace std;
struct em {
  long long int a, b;
};
bool comparator(em x, em y) {
  if (x.b >= y.b) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    long long int n, r, avg, i;
    cin >> n >> r >> avg;
    std::vector<em> v(n, {0, 0});
    for (i = 0; i < n; i++) cin >> v[i].a >> v[i].b;
    sort(v.begin(), v.end(), comparator);
    long long int sum = 0, ans = 0;
    for (auto x : v) {
      sum += x.a;
    }
    if (sum >= avg * n)
      cout << 0;
    else {
      sum = avg * n - sum;
      for (auto x : v) {
        if (x.a < r) {
          ans += x.b * (min(sum, r - x.a));
          sum -= min(sum, r - x.a);
        }
        if (sum == 0) break;
      }
      cout << ans;
    }
  }
  return 0;
}
