#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  scanf("%lld %lld %lld", &n, &m, &k);
  long long lmn[1000001];
  for (int i = 0; i < 1000001; ++i) {
    lmn[i] = 1000001;
  }
  for (int i = 0; i < n; ++i) {
    long long a, b;
    scanf("%lld %lld", &a, &b);
    --a;
    lmn[a] = min(lmn[a], b);
  }
  long long sum = 0;
  for (int i = 0; i < m; ++i) {
    sum += lmn[i];
  }
  printf("%lld", min(k, sum));
  return 0;
}
