#include<bits/stdc++.h>#define P pair<int, int>#define lowbit(x) (x & -x)#define mem(a, b) memset(a, b, sizeof(a))#define REP(i, n) for (int i = 1; i <= (n); ++i)#define rep(i, n) for (int i = 0; i < (n); ++i)#define N 200006#define LL long longusingnamespace std;int sum[N];intmain(){#ifndef ONLINE_JUDGEfreopen("in.txt","r",stdin);#endifint n, s;while(scanf("%d %d",&n,&s)!=EOF){mem(sum,0);int u, v;
rep (i, n-1){scanf("%d %d",&u,&v);
sum[u]++;
sum[v]++;}int tot =0;
REP (i, n){if(sum[i]==1) tot++;}printf("%.6lf\n", s *1.0/ tot *2);}return0;}