#include <bits/stdc++.h>
using namespace std;
const int N = 100110;
const int INF = 1000000000;
const int Mod = 1000000007;
long long dep[N];
int n, K, m;
vector<int> to[N];
void dfs(int u, int fa, int dis) {
  dep[dis]++;
  for (int i = to[u].size() - 1; i >= 0; i--) {
    int v = to[u][i];
    if (v == fa) continue;
    dfs(v, u, dis + 1);
  }
}
int main() {
  scanf("%d%d%d", &n, &K, &m);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    to[x].push_back(y);
    to[y].push_back(x);
  }
  dfs(1, -1, 0);
  long long tot = 0, cost = 0, now = 0, p = n - 1;
  long long ans = 0;
  for (int i = 1; i <= n; i++) ans = max(ans, dep[i]);
  ans = min(ans, 1LL * K);
  for (int i = n - 1; i > 0; i--) {
    if (p > i) {
      p = i;
      cost = 0;
      now = 0;
      tot = dep[i + 1];
    }
    while (p > 0) {
      if (tot + dep[p] > K) break;
      if (cost + dep[p] * (i - p + 1) > m) break;
      tot += dep[p];
      now += dep[p];
      cost += dep[p] * (i - p + 1);
      p--;
    }
    int sz = 0;
    if (p > 0) sz = min(K - tot, (m - cost) / (i - p + 1));
    ans = max(ans, tot + sz);
    cost -= now;
    now -= dep[i];
    tot -= dep[i + 1];
  }
  cout << ans << endl;
  return 0;
}
