#include <bits/stdc++.h>
using namespace std;
struct Edge {
  int num;
  int next;
};
Edge e[1000000];
int p[100001];
int d[100001];
long long a[100001];
long long s[100001];
long long m, t;
long long n;
int z;
void add(int u, int v) {
  z++;
  e[z].num = v;
  e[z].next = p[u];
  p[u] = z;
}
void dfs(int u, int from) {
  d[u] = d[from] + 1;
  for (int temp = p[u]; temp != -1; temp = e[temp].next) {
    int v = e[temp].num;
    if (v != from) dfs(v, u);
  }
  return;
}
int main() {
  memset(p, -1, sizeof(p));
  int k1, k2;
  scanf("%I64d%I64d%I64d", &n, &m, &t);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &k1, &k2);
    add(k1, k2);
    add(k2, k1);
  }
  dfs(1, 0);
  for (int i = 1; i <= n; i++) a[d[i]]++;
  int r;
  for (int i = n; i >= 1; i--)
    if (a[i]) {
      r = i;
      break;
    }
  a[1] = 0;
  for (int i = 2; i <= n; i++) s[i] = s[i - 1] + a[i];
  long long l = r;
  long long sum = 0;
  long long ans = 0;
  long long a1 = 0;
  for (long long i = r; i > 1; i--) {
    if (l > i) {
      l = i;
      a1 = 0;
    }
    while (l > 1 && a1 + a[l] * (i - l) <= t) {
      a1 += a[l] * (i - l);
      sum += a[l];
      l--;
    }
    ans = max(ans, sum + min(a[l], (t - a1) / (i - l)));
    sum -= a[i];
    a1 -= s[i - 1] - s[l];
  }
  printf("%I64d\n", min(ans, m));
  return 0;
}
