#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
vector<int> e[maxn];
long double x, flow;
void dfs(int rt, int pr, long double mx) {
  int sons = e[rt].size();
  if (pr) sons--;
  if (sons == 0) {
    flow += mx;
  } else {
    long double nmx = min(mx, x / 2);
    if (sons == 1) nmx = mx;
    for (int nxt : e[rt]) {
      if (nxt != pr) {
        dfs(nxt, rt, nmx);
      }
    }
  }
}
int main() {
  int n, s;
  scanf("%d %d", &n, &s);
  for (int i = 1; i <= n - 1; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    e[x].push_back(y);
    e[y].push_back(x);
  }
  int rt = -1;
  for (int i = 1; i <= n; i++)
    if (e[i].size() > 2) rt = i;
  if (rt == -1)
    printf("%d\n", s);
  else {
    long double lo = 0, hi = 1e9 + 1;
    for (int i = 0; i <= 100; i++) {
      long double mid = (lo + hi) * .5;
      x = mid;
      flow = 0;
      dfs(rt, 0, x);
      if (flow <= s) {
        lo = mid;
      } else {
        hi = mid;
      }
    }
    printf("%.18Lf\n", lo);
  }
  return 0;
}
