#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
const long long inf = 1e9, MOD = 1e9 + 7, MAX = 2e5 + 8;
int ax[] = {1, -1, 1, -1, 1, -1, 1, -1};
int ay[] = {2, 2, -1, -2, 1, 1, -1, -1};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<int, int>> v(n);
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> v[i].second >> v[i].first;
    sum += v[i].second;
  }
  sort(v.begin(), v.end());
  long long req = n * avg, res = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].second < r && sum < req) {
      long long mn = min(r - v[i].second, req - sum);
      res += v[i].first * mn;
      sum += mn;
    }
  }
  cout << res;
}
