#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, s, dg[N];
double ans;
signed main() {
  scanf("%d%d", &n, &s);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    dg[u]++, dg[v]++;
  }
  ans = s;
  for (int i = 1; i <= n; i++) ans = min(ans, 2.0 * s / (1.0 * dg[i]));
  int cnt = 0;
  for (int i = 1; i <= n; i++)
    if (dg[i] == 1) cnt++;
  ans = min(ans, 2.0 * s / (1.0 * cnt));
  printf("%.8lf\n", ans);
}
