#include <bits/stdc++.h>
using namespace std;
const int M = 20000;
const int N = 10000;
const int inf = 1 << 29;
const double eps = 1e-10;
int a[M];
int n, m, k;
void init() {
  for (int i = 0; i <= n + 2; i++) a[i] = -1;
}
int main() {
  while (scanf("%d%d%d", &n, &m, &k) == 3) {
    init();
    int c, d;
    for (int i = 0; i < n; i++) {
      scanf("%d%d", &c, &d);
      if (a[c] == -1) {
        a[c] = d;
      } else {
        a[c] = min(a[c], d);
      }
    }
    int sum = 0;
    for (int i = 1; i <= m; i++) {
      if (sum + a[i] <= k && a[i] != -1) {
        sum += a[i];
      } else {
        sum = k;
      }
      if (sum >= k) break;
    }
    printf("%d\n", sum);
  }
  return 0;
}
