#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
inline long long read() {
  long long t = 0, dp = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') dp = -1;
    c = getchar();
  }
  while (isdigit(c)) t = t * 10 + c - 48, c = getchar();
  return t * dp;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
inline void write_p(long long x) {
  write(x);
  putchar(' ');
}
const int N = 1e6 + 10;
int n, s, d[N];
int main() {
  n = read();
  s = read();
  for (int i = 1; i <= n - 1; ++i) {
    int x = read(), y = read();
    d[x]++;
    d[y]++;
  }
  int S = 0;
  for (int i = 1; i <= n; ++i)
    if (d[i] == 1) S++;
  double r = (double)s / (double)S * 2.0;
  printf("%.10lf\n", r);
}
