#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, K, p, a, b;
  scanf("%d%d%d", &m, &K, &p);
  list<int> *d = new list<int>[m];
  for (int i = 0; i < m - 1; i++) {
    scanf("%d%d", &a, &b);
    a--;
    b--;
    d[a].push_back(b);
    d[b].push_back(a);
  }
  int *lc = new int[m];
  bool *t = new bool[m];
  for (int i = 0; i < m; i++) {
    lc[i] = 0;
    t[i] = true;
  }
  int *x = new int[m];
  int *y = new int[m];
  int k = 0;
  int l = 1;
  x[0] = 0;
  y[0] = 0;
  t[0] = false;
  while (k < l) {
    lc[y[k]]++;
    for (list<int>::iterator it = d[x[k]].begin(); it != d[x[k]].end(); it++) {
      int v = *it;
      if (t[v]) {
        x[l] = v;
        y[l] = y[k] + 1;
        t[v] = false;
        l++;
      }
    }
    k++;
  }
  int total_count = 0;
  int total_cost = 0;
  int max_result = 0;
  int *qwe = new int[m];
  k = 0;
  l = 0;
  for (int i = 1; i < m; i++) {
    if (lc[i] == 0) break;
    total_count += lc[i];
    if (total_count > max_result) max_result = total_count;
    if (max_result >= K) {
      cout << K;
      return 0;
    }
    total_cost += total_count;
    qwe[l++] = lc[i];
    while (total_cost > p) {
      int delta = total_cost - p;
      if (delta >= qwe[k] * (l - k)) {
        total_cost -= qwe[k] * (l - k);
        total_count -= qwe[k];
        k++;
      } else {
        int po = delta / (l - k);
        if (delta % (l - k)) po++;
        total_count -= po;
        total_cost -= po * (l - k);
        qwe[k] -= po;
      }
    }
  }
  cout << max_result;
  return 0;
}
