#include <bits/stdc++.h>
const unsigned long long inf = 1LL << 61;
const double eps = 1e-5;
using namespace std;
bool cmp(int a, int b) { return a > b; }
vector<int> v[10000 + 10];
int p[10000 + 10];
int main() {
  int n, m, k;
  int a, b;
  while (cin >> n >> m >> k) {
    memset(p, 0, sizeof(p));
    for (int i = 1; i <= n; i++) {
      cin >> a >> b;
      v[a].push_back(b);
    }
    int sum = 0;
    for (int i = 1; i <= m; i++) {
      int t = 1 << 30;
      for (int j = 0; j < v[i].size(); j++) {
        t = min(t, v[i][j]);
      }
      sum += t;
    }
    cout << min(sum, k) << endl;
  }
  return 0;
}
