#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m, k, kk, x, y;
  cin >> n >> m >> k;
  kk = k;
  long long int a[m];
  for (long long int i = 0; i < m; i++) a[i] = 9999999999;
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y;
    a[x - 1] = min(a[x - 1], y);
  }
  for (long long int i = 0; i < m; i++) {
    if (a[i] >= kk)
      kk = 0;
    else
      kk -= a[i];
    if (kk == 0) break;
  }
  cout << k - kk;
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  while (t--) solve();
  cerr << '\n'
       << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms\n";
}
