#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 5;
const long long linf = 1e18 + 5;
const int N = 1e5 + 5;
int n, k, p, x, y, rem, sum, maxd, dep[N], in[N];
vector<int> v[N];
void dfs(int root = 0, int x = 1, int d = 1) {
  dep[d]++;
  maxd = max(maxd, d);
  for (__typeof((v[x]).begin()) it = (v[x]).begin(); it != (v[x]).end(); it++)
    if (*it != root) dfs(x, *it, d + 1);
}
void make(int i) {
  int add = min(k, dep[i] - in[i]);
  if (i != maxd) add = min(add, rem / (maxd - i));
  k -= add;
  sum += add;
  in[i] += add;
  rem -= add * (maxd - i);
}
int main() {
  ios ::sync_with_stdio(0);
  cin >> n >> k >> p;
  for (int i = 1; i <= n - 1; i++) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  dfs();
  rem = p;
  int last = maxd, ans = 0;
  for (int i = maxd; i >= 2; i--) {
    maxd = i;
    rem += sum - in[i + 1];
    sum -= in[i + 1];
    k += in[i + 1];
    while (last > 1) {
      make(last);
      if (!in[last]) break;
      last--;
    }
    last++;
    ans = max(ans, sum);
  }
  cout << ans << '\n';
  return 0;
}
