#include <bits/stdc++.h>
using namespace std;
const int M = 333333;
const int INF = 2000000000;
int n, m, k, a[M];
inline int read() {
  char c = getchar();
  int ans = 0;
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9')
    ans = (ans << 1) + (ans << 3) + (c ^ 48), c = getchar();
  return ans;
}
int main() {
  n = read(), m = read(), k = read();
  for (int i = 1; i <= m; i++) a[i] = INF;
  for (int i = 1, x, c; i <= n; i++) {
    x = read(), c = read();
    a[x] = min(a[x], c);
  }
  int ans = 0;
  for (int i = 1; i <= m; i++) ans += a[i];
  printf("%d", min(ans, k));
  return 0;
}
