#include <bits/stdc++.h>
using namespace std;
int n, ans, d[200000];
double s;
int main() {
  scanf("%d%lf", &n, &s);
  ans = n;
  for (int i = (1); i <= (n - 1); ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (++d[x] == 2) --ans;
    if (++d[y] == 2) --ans;
  }
  printf("%.15lf\n", s / ans * 2);
}
