#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, r, i, c, che[100005] = {}, s = 0;
  map<int, int> p;
  cin >> n >> m >> k;
  for (i = 0; i < n; i++) {
    cin >> r >> c;
    if (!che[r]) {
      p[r] = c;
      che[r]++;
    } else {
      p[r] = min(p[r], c);
    }
  }
  for (map<int, int>::iterator ite = p.begin(); ite != p.end(); ite++) {
    s += ite->second;
  }
  cout << min(s, k) << "\n";
  return 0;
}
