#include <bits/stdc++.h>
using namespace std;
int masr[1001];
int maszh[1001];
int main() {
  int n, m, k, t = 0;
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    cin >> masr[i] >> maszh[i];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (masr[i] == masr[j] && i < j) {
        maszh[i] = min(maszh[i], maszh[j]);
        maszh[j] = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    t += maszh[i];
  }
  if (t <= k) {
    cout << t;
  } else {
    cout << k;
  }
  cin >> n;
  return 0;
}
