#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int main() {
  int n, r, avg, a, b;
  scanf("%d", &n);
  scanf("%d", &r);
  scanf("%d", &avg);
  int i, j;
  long long int score = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a);
    scanf("%d", &b);
    v.push_back(make_pair(b, a));
    score += a;
  }
  long long int ans = 0;
  if ((long long int)n * avg > score) {
    sort(v.begin(), v.end());
    long long int diff = (long long int)n * avg - score;
    for (i = 0; i < n; i++) {
      long long int times = r - v[i].second;
      if (times <= 0) continue;
      if (diff < times) times = diff;
      diff -= times;
      ans += (long long int)v[i].first * times;
      if (diff == 0) break;
    }
  }
  printf("%I64d\n", ans);
}
