#include <bits/stdc++.h>
using namespace std;
int n, m, p;
const int N = 200020;
int nex[N], head[N], to[N], rk[N], dep[N];
int a[N], cnt, maxd;
void add(int x, int y) {
  nex[++cnt] = head[x];
  head[x] = cnt;
  to[cnt] = y;
}
void dfs(int u, int pre) {
  dep[u] = dep[pre] + 1;
  maxd = max(maxd, dep[u]);
  a[dep[u]]++;
  for (int i = head[u]; i; i = nex[i]) {
    if (to[i] == pre) continue;
    dfs(to[i], u);
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &p);
  int x, y;
  for (int i = 1; i < n; i++) scanf("%d%d", &x, &y), add(x, y), add(y, x);
  dep[0] = -1;
  dfs(1, 0);
  int j = 1, ans1 = 0;
  long long cntt = 0, ans = 0;
  for (int i = 1; i <= maxd; i++) {
    for (int k = 1; k <= a[i]; k++) {
      while (j <= maxd && ans + cntt <= p) ans += cntt, cntt += a[j], j++;
      ans1 = max(ans1, (int)cntt);
      ans -= 1LL * (j - i - 1);
      cntt--;
    }
  }
  printf("%d\n", min(m, ans1));
  return 0;
}
