#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  while (cin >> n >> m >> k) {
    int* teeth = new int[m];
    int i, index, via;
    for (i = 0; i < m; i++) {
      teeth[i] = INT_MAX;
    }
    for (i = 0; i < n; i++) {
      cin >> index >> via;
      if (teeth[index - 1] > via) teeth[index - 1] = via;
    }
    int sum = 0;
    for (i = 0; i < m; i++) {
      sum += teeth[i];
    }
    if (sum > k) sum = k;
    cout << sum << endl;
    delete[] teeth;
  }
  return 0;
}
