#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long power(unsigned long long a, unsigned long long b,
                unsigned long long ret = 1LL) {
  while (b--) ret = (ret * a);
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, r, avg, sum = 0;
  cin >> n >> r >> avg;
  vector<pair<long long, long long>> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].second >> v[i].first;
    sum += v[i].second;
  }
  sort((v).begin(), (v).end());
  long long k = 0, ans = 0;
  while (sum < n * avg) {
    long long p = min(r - v[k].second, n * avg - sum);
    sum += p;
    ans += v[k].first * p;
    k++;
  }
  cout << ans;
  return 0;
}
