#include <bits/stdc++.h>
using namespace std;
const int N = 200025, inf = 0x3f3f3f3f;
int read() {
  int f = 1, g = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) g = g * 10 + ch - '0';
  return f * g;
}
int n, s, deg[N], cnt;
int main() {
  n = read();
  s = read();
  for (int i = 1; i < n; i++) {
    int u = read(), v = read();
    deg[u]++;
    deg[v]++;
  }
  for (int i = 1; i <= n; i++)
    if (deg[i] == 1) cnt++;
  printf("%.12lf\n", 2.0 * s / cnt);
  return 0;
}
