#include <bits/stdc++.h>
using namespace std;
int n, s, a, b, i, l, d[100005];
int main() {
  scanf("%d%d", &n, &s);
  for (i = 1; i < n; ++i) scanf("%d%d", &a, &b), ++d[a], ++d[b];
  for (i = 1; i <= n; ++i) l += (d[i] == 1);
  printf("%.7f", 1.0 * s / l * 2);
  return 0;
}
