#include <bits/stdc++.h>
using namespace std;
int N, M, T;
int a[1005];
int main() {
  int i, j, k;
  scanf("%d%d%d", &N, &M, &T);
  for (i = 1; i <= M; i++) a[i] = -1;
  for (i = 1; i <= N; i++) {
    scanf("%d%d", &j, &k);
    a[j] = (a[j] == -1 ? k : min(k, a[j]));
  }
  k = 0;
  for (i = 1; i <= M; i++) k += a[i];
  printf("%d\n", min(k, T));
  scanf(" ");
}
