#include <bits/stdc++.h>
using namespace std;
const int max_n = 100000;
vector<vector<int> > adj;
int depth_cnt[max_n];
void traverse(int now, int parent, int depth) {
  depth_cnt[depth]++;
  for (int i = 0; i < adj[now].size(); i++)
    if (adj[now][i] != parent) traverse(adj[now][i], now, depth - 1);
}
int main() {
  int m, k, p;
  scanf("%d %d %d", &m, &k, &p);
  adj.resize(m);
  for (int i = 0; i < m - 1; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    adj[a - 1].push_back(b - 1);
    adj[b - 1].push_back(a - 1);
  }
  traverse(0, -1, m - 1);
  depth_cnt[m - 1] = 0;
  int res = 0;
  int total_cost = 0;
  int total_cnt = 0;
  int j = 1;
  for (int i = 1; i < m; i++) {
    j = max(j, i);
    while (j < m && total_cost + (j - i) * (long long)depth_cnt[j] <= p) {
      total_cost += (j - i) * (long long)depth_cnt[j];
      total_cnt += depth_cnt[j];
      j++;
    }
    int now_cnt = total_cnt;
    if (j < m) now_cnt += (p - total_cost) / (j - i);
    res = max(res, now_cnt);
    total_cnt -= depth_cnt[i];
    total_cost -= total_cnt;
  }
  printf("%d\n", min(res, k));
  return 0;
}
