#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, n, m, k, a[1001];
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 0; i < m; ++i) a[i] = 1e6;
  while (n--) {
    scanf("%d %d", &x, &y);
    a[x - 1] = min(a[x - 1], y);
  }
  while (m--) n += a[m];
  printf("%d\n", min(n + 1, k));
}
