#include <bits/stdc++.h>
using namespace std;
int min1[1001], total;
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= 1000; i++) min1[i] = 1000001;
  for (int i = 1; i <= n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    if (min1[a] > b) min1[a] = b;
  }
  for (int i = 1; i <= 1000; i++)
    if (min1[i] < 1000001) total += min1[i];
  if (total <= k) k = total;
  cout << k << endl;
  return 0;
}
