#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, sum = 0;
  cin >> n >> m >> k;
  int a[m];
  for (int j = 0; j < m; j++) {
    a[j] = -1;
  }
  for (int k = 0; k < n; k++) {
    int d, c;
    cin >> d >> c;
    if (a[d - 1] >= c) {
      sum = sum - a[d - 1] + c;
      a[d - 1] = c;
    }
    if (a[d - 1] == -1) {
      sum = sum + c;
      a[d - 1] = c;
    }
  }
  if (sum < k)
    cout << sum;
  else
    cout << k;
  return 0;
}
