#include <bits/stdc++.h>
double point[100000];
int main() {
  int n;
  double sum;
  double numofleave = 0;
  scanf("%d %lf", &n, &sum);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    point[a]++;
    point[b]++;
  }
  for (int i = 1; i <= n; i++) {
    if (point[i] == 1) {
      numofleave++;
    }
  }
  double result;
  result = sum / numofleave * 2;
  printf("%lf\n", result);
  return 0;
}
