#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
int d[100010];
double S;
int main() {
  int n = read(), u, v, ans = 0;
  cin >> S;
  for (int i = 1; i < n; i++) {
    u = read();
    v = read();
    d[u]++, d[v]++;
  }
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) ans++;
  printf("%.10lf", S / ans * 2);
}
