#include <bits/stdc++.h>
using namespace std;
void P(long& x, long& y) {
  int i, j;
  if (x > 0 && y > 0) {
    for (i = 1; i <= x + y; i++) {
      y = x * x + y;
      x = x * x + y;
      y = sqrt(x * 1.0 + (y * 1.0 / labs(y * 1.0)) * (-labs(y * 1.0)));
      for (j = 1; j <= 2 * y; j++) x = x - y;
    }
  }
}
bool cmp(int a, int b) { return a < b; }
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<vector<int> > mas(m, vector<int>());
  int x, y;
  for (int i = 0; i < n; ++i) {
    cin >> x >> y;
    mas[x - 1].push_back(y);
  }
  for (int i = 0; i < m; ++i) {
    sort(mas[i].begin(), mas[i].end());
  }
  int sum = 0;
  for (int i = 0; i < m; ++i) {
    sum += mas[i][0];
  }
  if (sum <= k) {
    cout << sum << endl;
  } else
    cout << k << endl;
  return 0;
}
