#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)(1e5) + 10;
int n, k, p;
vector<int> g[maxn];
int ch[maxn], h;
void dfs1(int v, int pr = -1, int H = 0) {
  ch[H]++;
  h = max(h, H + 1);
  for (int i = 0; i < (int)(g[v]).size(); i++) {
    int to = g[v][i];
    if (to == pr) continue;
    dfs1(to, v, H + 1);
  }
}
int ps[maxn];
int main() {
  scanf("%d%d%d", &n, &k, &p);
  for (int i = 1; i < n; i++) {
    int v, u;
    scanf("%d%d", &v, &u);
    --v;
    --u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  dfs1(0);
  reverse(ch, ch + h);
  --h;
  for (int i = 0; i < h; i++) {
    if (i > 0) ps[i] = ps[i - 1];
    ps[i] += ch[i];
  }
  int cur = 0;
  int s = 0;
  int mx = 0;
  for (int i = 0, j = 0; i < h; i++) {
    int add = 0;
    j = max(i, j);
    while (j < h) {
      add = min(k - s, ch[j]);
      if (j - i > 0) add = min(add, (p - cur) / (j - i));
      if (add < ch[j]) {
        break;
      }
      s += add;
      cur += add * (j - i);
      j++;
      add = 0;
    }
    mx = max(mx, s + add);
    s -= ch[i];
    if (j > 0) cur -= ps[j - 1] - ps[i];
  }
  printf("%d\n", mx);
  return 0;
}
