#include <bits/stdc++.h>
using namespace std;
void read(int &x) {
  x = 0;
  char c = getchar();
  for (; c < 48; c = getchar())
    ;
  for (; c > 47; c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
}
void read(long long &x) {
  x = 0;
  char c = getchar();
  for (; c < 48; c = getchar())
    ;
  for (; c > 47; c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
}
struct ed {
  int x, nx;
} e[200005 << 1];
int nx[200005], ecnt = 1;
void add(int x, int y) {
  e[ecnt] = (ed){y, nx[x]};
  nx[x] = ecnt++;
}
int n, tot, dep[200005], Q[200005];
long long cnt[200005], used[200005];
bool vis[200005];
void bfs(int x) {
  vis[x] = 1;
  Q[++tot] = x;
  for (int i = 1; i <= n; i++) {
    x = Q[i];
    for (int j = nx[x]; j; j = e[j].nx)
      if (!vis[e[j].x]) {
        dep[e[j].x] = dep[x] + 1;
        cnt[dep[e[j].x]]++;
        vis[e[j].x] = 1;
        Q[++tot] = e[j].x;
      }
  }
}
int res = 1;
long long p;
int main() {
  int k, p, x, y;
  read(n);
  read(k);
  read(p);
  k = min(n, k);
  if (k == 0) {
    printf("0\n");
    return 0;
  }
  for (int i = 1; i < n; i++) {
    read(x);
    read(y);
    add(x, y);
    add(y, x);
  }
  bfs(1);
  int l, r, now, num, mx = 0;
  long long cost = 0;
  for (int i = 1; i <= n; i++)
    if (cnt[i]) mx = i;
  for (int i = 1; i * 2 <= mx; i++) swap(cnt[i], cnt[mx - i + 1]);
  for (l = 1, r = 0, now = 0; l <= mx && r <= mx;) {
    if (r < l - 1) {
      now = cost = 0;
      r = l - 1;
    }
    if (r + 1 <= mx && r + 1 - l <= (p - cost)) {
      if (r + 1 - l != 0)
        num = min((p - cost) / (r + 1 - l), cnt[r + 1] - used[r + 1]);
      else
        num = cnt[r + 1] - used[r + 1];
      used[r + 1] += num;
      cost += 1ll * (r + 1 - l) * num;
      now += num;
      if (used[r + 1] == cnt[r + 1]) r++;
    } else {
      cost -= now - used[l];
      now -= used[l];
      used[l] = 0;
      l++;
    }
    if (now > res) res = now;
    if (res >= k) {
      printf("%d\n", k);
      return 0;
    }
  }
  printf("%d\n", res);
  return 0;
}
