#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int a, b, c, d, i, j, n, m, k, ans;
int mas[1001];
int main() {
  scanf("%d%d%d", &n, &m, &a);
  memset(mas, 63, sizeof(mas));
  for (int _n((n)-1), i(0); i <= _n; i++) {
    scanf("%d%d", &b, &c);
    --b;
    mas[b] = min(mas[b], c);
  }
  for (int _n((m)-1), i(0); i <= _n; i++) ans += mas[i];
  ans = min(ans, a);
  printf("%d\n", ans);
}
