#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int n, m, p;
vector<int> edge[200000];
int d[200000];
long long s[200000];
long long s2[200000];
void back(int now, int par, int dep) {
  d[dep]++;
  for (auto next : edge[now]) {
    if (par == next) continue;
    back(next, now, dep + 1);
  }
}
long long sum(int x, int y) {
  if (x == 0)
    return s[y];
  else
    return s[y] - s[x - 1];
}
long long sum2(int x, int y) {
  if (x == 0)
    return s2[y];
  else
    return s2[y] - s2[x - 1];
}
int param(int x) {
  int i, j;
  int top = n;
  int nowh = 0;
  long long min = 9223372036854775807ll;
  for (i = n - 1; i >= 0; i--) {
    while (top > 0 && nowh < x) {
      nowh += d[top];
      top--;
    }
    if (nowh < x) break;
    long long remain = x - sum(top + 2, i);
    long long dab = sum2(top + 2, i) - (long long)(n - i) * sum(top + 2, i);
    dab += remain * (long long)(i - top - 1);
    if (min > dab) min = dab;
    nowh -= d[i];
  }
  if (min <= p) return 1;
  return 0;
}
int main() {
  int i, j, k;
  scanf("%d%d%d", &n, &m, &p);
  for (i = 0; i < n - 1; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    x--, y--;
    edge[x].push_back(y);
    edge[y].push_back(x);
  }
  back(0, -1, 0);
  for (i = 0; i < n; i++) {
    s[i] = i == 0 ? d[i] : s[i - 1] + d[i];
    s2[i] = i == 0 ? 0 : s2[i - 1] + (n - i) * d[i];
  }
  int low = 1, high = m, mid;
  while (low <= high) {
    mid = (low + high) / 2;
    if (param(mid)) {
      low = mid + 1;
    } else
      high = mid - 1;
  }
  printf("%d", high);
  return 0;
}
