#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 + 100;
vector<int> adj[maxn];
long long par[maxn], h[maxn];
long long n, k, p;
long long t1[maxn], t2[maxn], sum1[maxn], sum2[maxn];
long long ans[maxn], op = 0;
bool mark[maxn];
pair<long long, long long> node[maxn];
void dfs(int v);
long long bin(int f, int e, int ind);
bool chk(long long tmp, int ind);
long long calc(long long tmp, long long ind);
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k >> p;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  dfs(0);
  for (int i = 0; i < n - 1; i++)
    node[i] = pair<long long, long long>(h[i + 1], i + 1);
  n--;
  sort(node, node + n);
  for (int i = 0; i < n; i++) {
    int ind = i;
    node[i].second = 0;
    while (ind < n && node[i].first == node[ind].first) ind++;
    for (int j = i; j < ind; j++) node[j].second = ind - i;
    ind--;
    i = ind;
  }
  n = unique(node, node + n) - node;
  sum1[0] = t1[0] = node[0].second;
  for (int i = 1; i < n; i++)
    t1[i] = node[i].second + t1[i - 1],
    sum1[i] = sum1[i - 1] + node[i].second * (i + 1);
  sum2[n - 1] = t2[n - 1] = node[n - 1].second;
  for (int i = n - 2; i >= 0; i--)
    t2[i] = t2[i + 1] + node[i].second,
    sum2[i] = sum2[i + 1] + node[i].second * (n - i);
  for (long long i = 0; i < n; i++) {
    long long tmp = bin(0, i + 1, i);
    long long tmp2 = calc(tmp, i);
    long long cnt = t1[i] - t1[i - tmp] + node[i - tmp].second;
    tmp2 = p - tmp2;
    ans[i] = cnt;
    if (i - tmp > 0) {
      long long cnt2 = node[i - tmp - 1].second;
      long long ii = tmp2 / (tmp + 1);
      ans[i] += min(ii, cnt2);
    }
  }
  for (int i = 0; i < n; i++) op = max(op, (min(k, ans[i])));
  cout << op << '\n';
  return 0;
}
void dfs(int v) {
  mark[v] = true;
  for (int i = 0; i < adj[v].size(); i++) {
    int u = adj[v][i];
    if (!mark[u]) {
      h[u] = h[v] + 1, par[u] = v;
      dfs(u);
    }
  }
}
long long bin(int f, int e, int ind) {
  if (e - f < 2) return f;
  int mid = (f + e) / 2;
  if (chk(mid, ind)) return bin(f, mid, ind);
  return bin(mid, e, ind);
}
bool chk(long long tmp, int ind) {
  long long tmp2 = calc(tmp, ind);
  if (tmp2 <= p) return false;
  return true;
}
long long calc(long long tmp, long long ind) {
  long long p1 = sum2[ind - tmp] - sum2[ind];
  p1 -= (t2[ind - tmp] - t2[ind]) * (n - ind);
  return p1;
}
