#include <bits/stdc++.h>
using namespace std;
struct paird {
  long long int essay;
  long long int avail;
};
bool operator<(paird a, paird b) { return a.essay < b.essay; }
int main() {
  long long int n, r, avg;
  cin >> n >> r >> avg;
  long long int gradeneeded = n * avg;
  paird arr[n];
  for (long long int i = 0; i < n; i++) {
    paird temp;
    cin >> temp.avail >> temp.essay;
    gradeneeded -= temp.avail;
    temp.avail = r - temp.avail;
    arr[i] = temp;
  }
  sort(arr, arr + n);
  long long int sum = 0;
  for (long long int i = 0; i < n; i++) {
    if (gradeneeded <= arr[i].avail) {
      if (gradeneeded > 0) sum += (arr[i].essay) * gradeneeded;
      break;
    } else {
      sum += (arr[i].avail) * (arr[i].essay);
      gradeneeded -= arr[i].avail;
    }
  }
  cout << sum << endl;
}
