#include <bits/stdc++.h>
using namespace std;
long long n, r, a, s, d, k, i;
pair<long long, long long> e[100005];
int main() {
  cin >> n >> r >> a;
  d = n * a;
  for (; i < n; i++) cin >> e[i].second >> e[i].first, d -= e[i].second;
  sort(e, e + n);
  for (i = 0; d > 0; i++)
    k = min(r - e[i].second, d), s += k * e[i].first, d -= k;
  cout << s;
}
