#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, s, tot, k[N];
inline int read() {
  register int x = 0, f = 1;
  char s = getchar();
  while (!isdigit(s)) {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (isdigit(s)) {
    x = (x << 1) + (x << 3) + (s ^ 48);
    s = getchar();
  }
  return x * f;
}
int main() {
  n = read();
  s = read();
  int u, v;
  for (register int i = 1; i <= n - 1; ++i) {
    u = read();
    v = read();
    k[u]++;
    k[v]++;
  }
  tot = 0;
  for (register int i = 1; i <= n; i++)
    if (k[i] == 1) tot++;
  double ans = (double)s * 2 / tot;
  printf("%.18lf", ans);
  return 0;
}
