#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int ans = 0;
  char ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) ans = (ans << 3) + (ans << 1) + (ch ^ 48), ch = getchar();
  return ans;
}
const int N = 1e5 + 5;
int n, s, f[N], du[N], ans = 1;
long long tot = 0;
vector<int> e[N];
pair<int, int> p[N];
inline void dfs(int p, int fa) {
  for (register int i = 0; i < e[p].size(); ++i) {
    int v = e[p][i], w = du[p] == 1 || du[v] == 1;
    if (v ^ fa) f[v] = f[p] + w, dfs(v, p);
  }
}
int main() {
  n = read(), s = read();
  for (register int i = 1, u, v; i < n; ++i)
    p[i].first = u = read(), p[i].second = v = read(), e[u].push_back(v),
    e[v].push_back(u), ++du[u], ++du[v];
  dfs(1, 0);
  for (register int i = 1; i < n; ++i)
    if (du[p[i].first] == 1 || du[p[i].second] == 1) ++tot;
  for (register int i = 2; i <= n; ++i)
    if (f[i] > f[ans]) ans = i;
  f[ans] = 0, dfs(ans, 0), ans = 1;
  for (register int i = 1; i <= n; ++i)
    if (f[i] > f[ans]) ans = i;
  printf("%.10lf", (double)s / tot * f[ans]);
  return 0;
}
