#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline void chmin(A& a, B b) {
  if (a > b) a = b;
}
template <typename A, typename B>
inline void chmax(A& a, B b) {
  if (a < b) a = b;
}
long long N, K, P;
vector<long long> G[111111];
long long cnt[111111];
long long sum[111111];
long long luz[111111];
void dfs(long long v, long long p, long long d) {
  cnt[d]++;
  for (auto u : G[v]) {
    if (u == p) continue;
    dfs(u, v, d + 1);
  }
}
signed main() {
  scanf("%lld%lld%lld", &N, &K, &P);
  for (long long i = 0; i < (N - 1); i++) {
    long long a, b;
    scanf("%lld%lld", &a, &b);
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  dfs(0, -1, 0);
  cnt[0] = 0;
  for (long long i = 1; i < N; i++) sum[i] = sum[i - 1] + cnt[i];
  for (long long i = 1; i < N; i++) {
    luz[i] = luz[i - 1] + sum[i - 1];
  }
  long long ans = 0;
  for (long long i = 1; i < N; i++) {
    if (sum[i] <= K && luz[i] <= P) {
      chmax(ans, sum[i]);
      continue;
    }
    long long ub = i + 1;
    long long lb = 1;
    while (ub - lb > 1) {
      long long mid = (ub + lb) / 2;
      long long l = luz[i];
      l -= luz[mid - 1];
      l -= sum[mid - 1] * (i - mid + 1);
      long long s = sum[i];
      s -= sum[mid - 1];
      if (s <= K && l <= P)
        ub = mid;
      else
        lb = mid;
    }
    long long l = luz[i] - luz[ub - 1] - sum[ub - 1] * (i - ub + 1);
    long long s = sum[i] - sum[ub - 1];
    long long tmp = INT_MAX;
    chmin(tmp, K - s);
    if (i != lb) chmin(tmp, (P - l) / (i - lb));
    chmax(ans, s + tmp);
  }
  cout << ans << endl;
  return 0;
}
