#include <bits/stdc++.h>
using namespace std;
int a[1001];
int compare(int a, int b) { return a > b; }
int main() {
  int n, m, k, sum(0);
  cin >> n >> m >> k;
  memset(a, -1, sizeof(a));
  for (int i = 1; i <= n; i++) {
    int line, res;
    cin >> line >> res;
    if (a[line] != -1)
      a[line] = min(a[line], res);
    else
      a[line] = res;
  }
  sort(a, a + n, compare);
  for (int i = 0; i <= n; i++) {
    if (a[i] != -1) {
      sum += a[i];
    }
  }
  cout << min(sum, k) << endl;
  return 0;
}
