#include <bits/stdc++.h>
using namespace std;
int a[1010], n, m, k, i, j, r, c, res = 0;
int main() {
  cin >> n >> m >> k;
  for (i = 1; i <= m; i++) a[i] = 1000001;
  for (i = 1; i <= n; i++) {
    cin >> r >> c;
    a[r] = min(c, a[r]);
  }
  sort(a + 1, a + m + 1);
  for (i = m; i >= 1; i--)
    if (a[i] <= k) {
      res += a[i];
      k -= a[i];
    } else {
      res += k;
      k = 0;
      break;
    }
  cout << res;
}
