#include <bits/stdc++.h>
int main() {
  struct crucian {
    long long int val, crucian;
  } stu[1000];
  long long int i, j, k, m, n, sign = 0, sum = 0, value, tem_crucian, previous;
  scanf("%lld %lld %lld", &n, &m, &k);
  for (i = 0, previous = 0; i < n; i++) {
    scanf("%lld %lld", &value, &tem_crucian);
    for (j = 0, sign = 0; j < previous; j++) {
      if (value == stu[j].val) {
        sign = 1;
        if (stu[j].crucian > tem_crucian) {
          stu[j].crucian = tem_crucian;
        }
      }
    }
    if (sign == 0) {
      stu[previous].val = value;
      stu[previous].crucian = tem_crucian;
      previous++;
    }
  }
  for (i = 0; i < previous; i++) {
    sum = sum + stu[i].crucian;
    if (sum > k) {
      printf("%lld\n", k);
      return 0;
    }
  }
  printf("%lld\n", sum);
  return 0;
}
