#include <bits/stdc++.h>
#pragma GCC optimize("O3")
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long power(long long a, long long b, long long m = 1000000007) {
  long long answer = 1;
  while (b) {
    if (b & 1) answer = (answer * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return answer;
}
using namespace std;
void ctrl() { cout << "Control\n"; }
signed main() {
  long long n, r, avg;
  cin >> n >> r >> avg;
  vector<pair<long long, long long> > v;
  long long second = 0;
  for (register long long i = 0; i < n; i += 1) {
    long long a, b;
    cin >> a >> b;
    v.push_back(make_pair(b, r - a));
    second += a;
  }
  long long req = n * avg - second;
  long long es = 0;
  sort(v.begin(), v.end());
  for (long long i = 0; i < n; i++) {
    long long x = min(req, v[i].second);
    x = max((long long)0, x);
    es += v[i].first * x;
    req -= x;
    if (req <= 0) break;
  }
  cout << es;
  return 0;
}
