#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a(1001, -1);
  int n, m, k;
  cin >> n >> m >> k;
  int row;
  int val;
  for (int i = 0; i < n; i++) {
    cin >> row >> val;
    if (a[row] == -1)
      a[row] = val;
    else
      a[row] = min(a[row], val);
  }
  int ans = 0;
  for (int i = 1; i < 1001; i++)
    if (a[i] != -1) ans += a[i];
  cout << min(ans, k);
  return 0;
}
