#include <bits/stdc++.h>
using namespace std;
struct _ {
  _() { ios_base::sync_with_stdio(0); }
} _;
template <class A, class B>
ostream &operator<<(ostream &o, pair<A, B> t) {
  o << "(" << t.first << ", " << t.second << ")";
  return o;
}
template <class T>
string tostring(T first, int len = 0, char c = '0') {
  stringstream ss;
  ss << first;
  string r = ss.str();
  if (r.length() < len) r = string(len - r.length(), c) + r;
  return r;
}
template <class T>
void PV(T a, T b, int n = 0, int w = 0, string s = " ") {
  int c = 0;
  while (a != b) {
    cout << tostring(*a++, w, ' ');
    if (a != b && (n == 0 || ++c % n))
      cout << s;
    else
      cout << "\n";
    cout.flush();
  }
}
template <class T>
inline bool chmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
const long long linf = 0x3f3f3f3f3f3f3f3fLL;
const int inf = 0x3f3f3f3f;
const int mod = int(1e9) + 7;
const int N = 111111;
int m, k, p;
vector<int> g[N];
int depth[N];
long long s[N];
long long sum[N];
long long ssum[N];
void dfs(int u, int par, int d) {
  depth[u] = d;
  s[d]++;
  for (int v : g[u])
    if (v != par) {
      dfs(v, u, d + 1);
    }
}
int calc(int L, int R, int p) {
  if (L == R) return min(s[L], (long long)k);
  long long cost = R * (sum[R] - sum[L]) - (ssum[R] - ssum[L]);
  if (p < cost) return -1;
  long long cnt = sum[R] - sum[L];
  if (cnt > k) return -1;
  cnt += min(s[L], (p - cost) / (R - L));
  if (cnt > k) cnt = k;
  return cnt;
}
int main() {
  cin >> m >> k >> p;
  for (int i = 0; i < m - 1; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  dfs(0, -1, 0);
  s[0] = 0;
  for (int i = 1; i < N; i++) sum[i] = sum[i - 1] + s[i];
  for (int i = 1; i < N; i++) ssum[i] = ssum[i - 1] + i * s[i];
  int res = 0;
  for (int i = 1; i < N; i++) {
    if (s[i] == 0) break;
    int L = 0, R = i;
    while (L < R) {
      int M = (L + R) / 2;
      int cnt = calc(M, i, p);
      if (cnt < 0) {
        L = M + 1;
      } else {
        chmax(res, calc(L, i, p));
        R = M;
      }
    }
    chmax(res, calc(L, i, p));
  }
  cout << res << endl;
  return 0;
}
