#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    long long int n, m, k;
    cin >> n >> m >> k;
    map<long long int, vector<long long int>> mp;
    long long int i, x, y;
    for (i = 0; i < n; i++) {
      cin >> x >> y;
      mp[x].push_back(y);
    }
    long long int sum = 0, a = 1e18, b;
    for (auto x : mp) {
      a = 1e18;
      for (i = 0; i < x.second.size(); i++) a = min(a, x.second[i]);
      b = min(k, a);
      k -= a;
      sum += b;
      if (k <= 0) break;
    }
    cout << sum << "\n";
  }
  return 0;
}
