#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    if (mp.find(a) == mp.end()) {
      mp[a] = b;
    }
    mp[a] = min(mp[a], b);
  }
  int ans = 0;
  for (auto e : mp) {
    ans += e.second;
  }
  cout << min(ans, k);
  return 0;
}
