#include <bits/stdc++.h>
using namespace std;
int num[100005];
vector<int> ed[100005];
int f[100005];
int d[100005];
int main() {
  int m, k, p;
  cin >> m >> k >> p;
  if (k == 0) {
    cout << 0 << endl;
    return 0;
  }
  vector<int> q;
  for (int i = 1; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    ed[a].push_back(b);
    ed[b].push_back(a);
  }
  d[1] = 0;
  f[1] = -1;
  q.push_back(1);
  num[0] = 1;
  for (int i = 0; i < m - 1; ++i) {
    for (int j = 0; j < ed[q[i]].size(); ++j) {
      int a = ed[q[i]][j];
      if (a == f[q[i]]) continue;
      d[a] = d[q[i]] + 1;
      num[d[a]]++;
      f[a] = q[i];
      q.push_back(a);
    }
  }
  long long best = 0, cost = 0, sum = 0, cd;
  long long ind = 0;
  while (num[ind + 1] > 0) ind++;
  best = num[ind];
  sum = best;
  cd = ind;
  ind--;
  while (ind > 0) {
    if (cost + (cd - ind) * num[ind] <= p) {
      cost += (cd - ind) * num[ind];
      sum += num[ind];
      if (sum > best) best = sum;
      ind--;
    } else {
      int tmp = (p - cost) / (cd - ind);
      if (sum + tmp > best) best = sum + tmp;
      cost = cost - (sum - num[cd]);
      sum = sum - num[cd];
      cd--;
    }
  }
  if (best > k) best = k;
  cout << best << endl;
  return 0;
}
