#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, m, k, c, r, ans = 0;
  cin >> n >> m >> k;
  vector<int> v(m + 1, 1e9);
  while (n--) {
    cin >> r >> c;
    v[r] = min(v[r], c);
  }
  for (i = 1; i <= m; i++) ans += v[i];
  cout << min(ans, k);
}
