#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  long long a[m + 1];
  for (int i = 1; i <= m; i++) a[i] = LLONG_MAX;
  for (int i = 0; i < n; i++) {
    long long int row, p;
    scanf("%lld %lld", &row, &p);
    a[row] = min(a[row], p);
  }
  long long int res = 0;
  for (int i = 1; i <= m; i++) {
    if (a[i] != LLONG_MAX) res += a[i];
  }
  printf("%lld", min(res, (long long)k));
  return 0;
}
