#include <bits/stdc++.h>
int main(void) {
  int n, m, t;
  int a[1001];
  long k, s, ans, gg = 0;
  long b[1001];
  scanf("%d%d%ld", &n, &m, &k);
  for (int i = 0; i < n; i++) scanf("%d%ld", &a[i], &b[i]);
  for (int i = n; i > 1; i--)
    for (int j = 1; j < i; j++)
      if (a[j - 1] > a[j]) {
        t = a[j - 1];
        a[j - 1] = a[j];
        a[j] = t;
        s = b[j - 1];
        b[j - 1] = b[j];
        b[j] = s;
      }
  for (int i = 1; i < n; i++) {
    if (a[i] == a[i - 1]) {
      if (b[i] < b[i - 1]) b[i - 1] = b[i];
      for (int j = i; j < n - 1; j++) {
        a[j] = a[j + 1];
        b[j] = b[j + 1];
      }
      n--;
      i--;
    }
  }
  for (int i = 0; i < n; i++) {
    gg = gg + b[i];
  }
  if (gg > k)
    ans = k;
  else
    ans = gg;
  printf("%ld", ans);
}
