#include <bits/stdc++.h>
using namespace std;
int main() {
  {
    long long int n, ans = 0, m, k, f = 0, cnt = 0, cur = 0, x, y;
    cin >> n >> m >> k;
    map<int, vector<int>> mp;
    for (int i = 0; i < n; i++) {
      cin >> x >> y;
      mp[x].push_back(y);
    }
    for (auto c : mp) {
      cnt += *min_element(c.second.begin(), c.second.end());
    }
    if (cnt >= k)
      cout << k << endl;
    else
      cout << cnt << endl;
  }
}
