#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
int n, r;
long long av, sum, cost;
pair<long long, long long> a[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> r >> av;
  av *= n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].second >> a[i].first;
    sum += a[i].second;
  }
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++) {
    if (sum >= av) break;
    long long dis = r - a[i].second;
    if (dis + sum <= av) {
      sum += dis;
      cost += (dis * a[i].first);
    } else {
      dis = av - sum;
      sum += dis;
      cost += (dis * a[i].first);
    }
  }
  cout << cost << endl;
  return 0;
}
