#include <bits/stdc++.h>
using namespace std;
int r[1005];
void input() {
  int i, n, nr, nk, res, x, y;
  scanf("%d %d %d", &n, &nr, &nk);
  for ((i) = (1); (i) <= (nr); (i)++) r[i] = -1;
  for ((i) = 0; (i) < (n); (i)++) {
    scanf("%d %d", &x, &y);
    if (r[x] != -1)
      r[x] = ((r[x]) < (y) ? (r[x]) : (y));
    else
      r[x] = y;
  }
  sort(r + 1, r + nr + 1, greater<int>());
  res = 0;
  for ((i) = (1); (i) <= (nr); (i)++) {
    r[i] = ((r[i]) < (nk) ? (r[i]) : (nk));
    res += r[i];
    nk -= r[i];
  }
  printf("%d", res);
}
int main() {
  input();
  return 0;
}
