#include <bits/stdc++.h>
using namespace std;
int ans = 0, c[1001];
int cmp(int a, int b) { return a > b; }
int main() {
  int n, m, k, i, j, x, y;
  scanf("%d%d%d", &n, &m, &k);
  memset(c, -1, sizeof(c));
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x, &y);
    if (y < c[x] || c[x] == -1) c[x] = y;
  }
  sort(c + 1, c + n + 1, cmp);
  for (i = 1; i <= n; i++)
    if (c[i] != -1) ans += c[i];
  printf("%d", min(k, ans));
  return 0;
}
