#include <bits/stdc++.h>
using namespace std;
int i, n, s, u, v;
int d[100005];
double ans;
int fast() {
  int res = 0, fl = 1;
  char c = getchar();
  while (c < 48 && c > 57) {
    if (c == '-') fl = -1;
    c = getchar();
  }
  while (c >= 48 && c <= 57) res = res * 10 + c - 48, c = getchar();
  return res;
}
void write(int x) {
  if (x > 9) write(x / 10);
  putchar(x % 10 + 48);
}
int main() {
  n = fast(), s = fast();
  for (i = 1; i < n; i++) {
    u = fast(), v = fast();
    d[u]++, d[v]++;
  }
  for (i = 1; i <= n; i++)
    if (d[i] == 1) ans++;
  ans = (double)s / ans * 2;
  printf("%.7lf\n", ans);
  return 0;
}
