#include <bits/stdc++.h>
const long long gig = 1e18;
const long long gg = 25 * 1e6;
const long long md = 1e9 + 7;
const long long N = 100050;
const double PI = 3.1415926535897932384626433832795;
using namespace std;
pair<long long, long long> a[111111];
int main() {
  srand(time(NULL));
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m, r, ans = 0, z, o = 0;
  cin >> n >> r >> m;
  m *= n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].second >> a[i].first;
    o += a[i].second;
  }
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    z = m - o;
    if (z <= 0) break;
    z = min(z, r - a[i].second);
    ans += z * a[i].first;
    o += z;
  }
  cout << ans;
}
