#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:512000000")
using namespace std;
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
inline string tostr(const T& x) {
  stringstream ss;
  ss << x;
  return ss.str();
}
const long double EPS = 1e-12;
const int INF = 1000 * 1000 * 1000;
const char CINF = 102;
const long long LINF = INF * 1ll * INF;
const long double DINF = 1e200;
const long double PI = 3.1415926535897932384626433832795l;
int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
long long powmod(long long a, long long p, long long m) {
  long long r = 1;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
int n, k, p;
vector<int> gr[110000];
int D;
int A[110000];
void dfs(int v, int pr, int d) {
  D = max(D, d + 1);
  ++A[d];
  for (int i = 0; i < (((int)(gr[v]).size())); ++i) {
    int p = gr[v][i];
    if (p == pr) continue;
    dfs(p, v, d + 1);
  }
}
int main() {
  cin >> n >> k >> p;
  for (int i = 0; i < (n - 1); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    --a;
    --b;
    gr[a].push_back(b);
    gr[b].push_back(a);
  }
  dfs(0, -1, 0);
  int ans = 0;
  int a = 1;
  int s = 0;
  int m = 0;
  for (int b = 1; b < D; ++b) {
    m += s;
    s += A[b];
    while (s > k || m > p) {
      if (a > b) exit(123);
      m -= A[a] * (b - a);
      s -= A[a];
      ++a;
    }
    int t = 0;
    if (a > 1) {
      t = min(k - s, (b - a + 1) ? (p - m) / (b - a + 1) : INF);
    }
    ans = max(ans, s + t);
  }
  cout << ans;
  return 0;
}
