#include <bits/stdc++.h>
using namespace std;
vector<int> s[1001];
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int r, c;
  for (int i = 1; i <= n; ++i) {
    scanf("%d%d", &r, &c);
    s[r].push_back(c);
  }
  int ans = 0;
  for (int i = 1; i <= m; ++i) {
    if (s[i].size()) {
      int min = s[i][0];
      for (int j = 1; j < s[i].size(); ++j) {
        if (min > s[i][j]) min = s[i][j];
      }
      ans += min;
    }
  }
  if (ans > k) ans = k;
  printf("%d\n", ans);
  return 0;
}
