#include <bits/stdc++.h>
using namespace std;
int a[1001];
int cmp(int a, int b) { return a > b; }
inline int read() {
  int f = 1, x = 0;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (ch < '0' || ch > '9');
  do {
    x = x * 10 + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f * x;
}
int main() {
  int n, m, k;
  n = read();
  m = read();
  k = read();
  memset(a, -1, sizeof(a));
  int tmp;
  int x;
  for (int i = 1; i <= n; i++) {
    tmp = read();
    x = read();
    if (a[tmp] != -1)
      a[tmp] = min(a[tmp], x);
    else
      a[tmp] = x;
  }
  sort(a, a + n, cmp);
  int sum = 0;
  for (int i = 0; i <= n; i++)
    if (a[i] != -1) sum += a[i];
  printf("%d", min(sum, k));
  return 0;
}
