#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
long long m, k, p, arr[N], n;
void findArr() {
  vector<vector<int>> adj(m, vector<int>());
  for (int i = 0; i < m - 1; ++i) {
    int u, v;
    scanf("%d", &u), scanf("%d", &v);
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  queue<pair<int, int>> q;
  q.push(pair<int, int>(0, -1));
  while (q.size()) {
    int sz = q.size();
    arr[n++] = sz;
    while (sz--) {
      int cur = q.front().first;
      int fr = q.front().second;
      q.pop();
      for (int i = 0; i < adj[cur].size(); ++i)
        if (adj[cur][i] != fr) q.push(pair<int, int>(adj[cur][i], cur));
    }
  }
}
int main() {
  scanf("%lld", &m), scanf("%lld", &k), scanf("%lld", &p);
  findArr();
  long long e = n, cnt = 0, cost = 0, sum = 0, out = 0;
  for (long long s = n - 1; s >= 1; s--) {
    while (e - 1 >= 1 && cost + arr[e - 1] * (s - (e - 1)) <= p) {
      cnt += arr[e - 1];
      cost += arr[e - 1] * (s - (e - 1));
      sum += arr[e - 1];
      e--;
    }
    long long tmp = cnt;
    if (e - 1 >= 1) tmp += (p - cost) / (s - (e - 1));
    out = max(out, tmp);
    sum -= arr[s];
    cost -= sum;
    cnt -= arr[s];
  }
  cout << min(out, k);
}
