#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int mo = 1000000007;
const int inf = 0x3f3f3f3f;
const int INF = 2000000000;
int n, water, coin, d;
int h[100008];
struct line {
  int u, v, nt;
} eg[200008];
int lt[100008], sum;
void add(int u, int v) {
  eg[++sum] = (line){u, v, lt[u]};
  lt[u] = sum;
}
void dfs(int u, int fa, int dep) {
  h[u] = dep;
  for (int i = lt[u]; i; i = eg[i].nt) {
    int v = eg[i].v;
    if (v != fa) dfs(v, u, dep + 1);
  }
}
int main() {
  memset(lt, 0, sizeof(lt));
  ;
  sum = 1;
  scanf("%d %d %d", &n, &water, &coin);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    add(u, v);
    add(v, u);
  }
  dfs(1, 0, 1);
  sort(h + 1, h + n + 1);
  int i = 2, j = 2, ans = 1;
  long long cost = 0;
  while (i < n && j < n) {
    j++;
    if (h[j] != h[j - 1]) cost += j - i;
    while (cost > coin) {
      cost -= h[j] - h[i];
      i++;
    }
    ans = max(ans, j - i + 1);
  }
  printf("%d\n", min(ans, water));
}
