#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
bool sortbysec(const pair<long long, long long> &a,
               const pair<long long, long long> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, r, avg;
  cin >> n >> r >> avg;
  long long sum_needed = avg * n;
  vector<pair<long long, long long>> v;
  long long sum = 0;
  for (auto i = 0; i < n; ++i) {
    long long x, y;
    cin >> x >> y;
    if (x <= r) v.emplace_back(make_pair(x, y));
    sum += x;
  }
  long long aurKitneChahiye = sum_needed - sum;
  long long count = 0;
  if (aurKitneChahiye <= 0)
    cout << 0;
  else {
    sort(v.begin(), v.end(), sortbysec);
    for (auto grade : v) {
      if (grade.first >= r)
        continue;
      else {
        if ((r - grade.first) >= aurKitneChahiye) {
          count += (grade.second * aurKitneChahiye);
          break;
        } else {
          count += (grade.second * (r - grade.first));
          aurKitneChahiye -= (r - grade.first);
        }
      }
      if (aurKitneChahiye <= 0) break;
    }
    cout << count;
  }
}
