#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, r, c;
  const int INF = 1000005;
  scanf("%d%d%d", &n, &m, &k);
  int V[1005];
  vector<pair<int, int> > v;
  long long ans = 0, s = 0;
  for (int i = 0; i <= m; i++) V[i] = INF;
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &r, &c);
    V[r] = min(V[r], c);
  }
  for (int i = 1; i <= m; i++) {
    if (V[i] == INF)
      v.push_back(pair<int, int>(0, i));
    else
      v.push_back(pair<int, int>(V[i], i));
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  int flag = 0;
  for (int i = 0; i < m; i++) {
    if (s + v[i].first > k) {
      s = s + (k - s);
      flag = 1;
      break;
    }
    s = s + (long long)v[i].first;
  }
  cout << s << endl;
  return 0;
}
