#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    long long int n, m, k, ans = 0, i, c;
    cin >> n >> m >> k;
    map<long long int, long long int> m1;
    while (n--) {
      cin >> i >> c;
      if (m1.find(i) == m1.end())
        m1[i] = c;
      else
        m1[i] = min(m1[i], c);
    }
    for (auto it = m1.begin(); it != m1.end(); it++) {
      ans += it->second;
    }
    cout << min(ans, k);
  }
  return 0;
}
