#include <bits/stdc++.h>
using namespace std;
int n, m, k, sum = 0;
pair<int, int> a[1010];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < n; ++i) scanf("%d%d", &a[i].first, &a[i].second);
  sort(a, a + n);
  int minn = a[0].second;
  for (int i = 1; i < n; ++i)
    if (a[i].first == a[i - 1].first) {
      minn = min(minn, a[i].second);
    } else {
      sum += minn;
      minn = a[i].second;
    }
  sum += minn;
  if (k < sum)
    cout << k;
  else
    cout << sum;
  return 0;
}
