#include <bits/stdc++.h>
using namespace std;
const int maxn = 100040;
int de[maxn];
int main() {
  int n, s, x, y;
  scanf("%d%d", &n, &s);
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &x, &y);
    de[x]++, de[y]++;
  }
  int num = 0;
  for (int i = 1; i <= n; i++) {
    if (de[i] == 1) num++;
  }
  printf("%.10f\n", (double)2.0 * s / num);
  return 0;
}
