#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  map<int, vector<int> > mp;
  for (int i = 0; i < n; i++) {
    int r, c;
    cin >> r >> c;
    mp[r].push_back(c);
  }
  vector<int> vec;
  for (auto itr : mp) {
    int x = *min_element(itr.second.begin(), itr.second.end());
    vec.push_back(x);
  }
  sort(vec.rbegin(), vec.rend());
  int ans = 0;
  for (int i = 0; i < vec.size(); i++) {
    if (ans + vec[i] <= k) {
      ans = ans + vec[i];
    } else if (ans + vec[i] > k) {
      ans = ans + (k - ans);
    } else {
      break;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
