#include <bits/stdc++.h>
using namespace std;
inline long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline string get() {
  char ch[2000010];
  scanf("%s", ch);
  return ch;
}
inline void read(long long *a, long long n) {
  for (long long i = 0; i < n; i++) a[i] = in();
}
template <class blank>
inline void out(blank x) {
  cout << x << "\n";
  exit(0);
}
template <class blank>
inline void smin(blank &a, blank b) {
  a = min(a, b);
}
template <class blank>
inline void smax(blank &a, blank b) {
  a = max(a, b);
}
const long long maxn = 1e5 + 10;
const long long maxm = 1e6 + 10;
const long long maxlg = 21;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long INF = 1e18 + 10;
const long long SQ = 317 + 5;
vector<long long> g[maxn];
long long cnt[maxn], n, k, p, h[maxn];
vector<long long> NODE[maxn];
inline void dfs(long long node, long long fa = -1, long long h = 0) {
  NODE[h].push_back(node);
  cnt[h]++;
  ::h[node] = h;
  for (auto u : g[node])
    if (u - fa) dfs(u, node, h + 1);
}
struct cmp {
  inline bool operator()(const long long a, const long long b) const {
    return make_pair(h[a], a) < make_pair(h[b], b);
  }
};
set<long long, cmp> st;
long long res = 0;
int32_t main() {
  n = in(), k = min(in(), n - 1), p = in();
  for (long long i = 0; i < n - 1; i++) {
    long long v = in(), u = in();
    g[v].push_back(u);
    g[u].push_back(v);
  }
  dfs(1);
  long long need = 0;
  for (long long level = 1; level <= n; level++) {
    if (!cnt[level]) break;
    need += st.size();
    while (need > p) {
      long long node = *st.begin();
      need -= level - h[node];
      st.erase(node);
    }
    for (long long j = 0; j < cnt[level]; j++) st.insert(NODE[level][j]);
    res = max(res, (long long)st.size());
  }
  cout << min(res, k) << "\n";
}
