#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
static int N, S, deg[MAXN];
static double ans, dis[MAXN];
static vector<int> edge[MAXN];
double dfs(int u, int fa, double mid) {
  double w = mid / min(2, deg[u]), sum = 0;
  for (int v : edge[u])
    if (v != fa) {
      sum += dfs(v, u, mid);
      sum += w - dis[v];
      dis[u] = w;
    }
  return sum;
}
int main() {
  scanf("%d%d", &N, &S);
  for (int i = 0, u, v; i < N - 1; i++) {
    scanf("%d%d", &u, &v);
    edge[u].push_back(v);
    edge[v].push_back(u);
    deg[u]++;
    deg[v]++;
  }
  double l = 0, r = S, mid;
  for (int i = 0; i < 50; i++) {
    mid = (l + r) / 2;
    if (dfs(1, 0, mid) >= S)
      r = mid;
    else
      l = mid;
  }
  printf("%.10f\n", mid);
  return 0;
}
