#include <bits/stdc++.h>
using namespace std;
int n, k, p, x, y, e, ans, back, nowk, nowp, high;
int b[420001], nt[420001], h[420001], cnt[420001], sum[420001];
void wist(int x, int y) {
  b[++e] = y;
  nt[e] = h[x];
  h[x] = e;
}
void dfs(int x, int fa, int deep) {
  high = max(high, deep);
  cnt[deep]++;
  for (int j = h[x]; j; j = nt[j])
    if (b[j] != fa) dfs(b[j], x, deep + 1);
}
int main() {
  scanf("%d%d%d", &n, &k, &p);
  for (int i = 1; i <= n - 1; i++) {
    scanf("%d%d", &x, &y);
    wist(x, y);
    wist(y, x);
  }
  dfs(1, 0, 0);
  for (int i = 1; i <= high; i++) sum[i] = sum[i - 1] + cnt[i];
  back = high;
  nowk = nowp = 0;
  for (int i = high; i >= 1; i--) {
    if (cnt[i] + nowk > k && (long long)(k - nowk) * (back - i) + nowp <= p) {
      ans = k;
      break;
    }
    while ((long long)cnt[i] * (back - i) + nowp > p) {
      nowk += (p - nowp) / (back - i);
      ans = max(ans, nowk);
      back--;
      nowk = sum[back] - sum[i];
      nowp -= sum[back] - sum[i];
    }
    if ((long long)cnt[i] * (back - i) + nowp <= p) {
      nowk += cnt[i];
      nowp += cnt[i] * (back - i);
      ans = max(ans, nowk);
    }
  }
  printf("%d\n", min(k, ans));
  return 0;
}
