#include <bits/stdc++.h>
using namespace std;
int out[100100];
int main() {
  int n;
  scanf("%d", &n);
  double s;
  scanf("%lf", &s);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--;
    b--;
    out[a]++;
    out[b]++;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++)
    if (out[i] == 1) cnt++;
  printf("%.10f\n", (s / cnt) * 2);
  return 0;
}
