#include <bits/stdc++.h>
using namespace std;
int n, d[100004];
double s;
int main() {
  memset(d, 0, sizeof(d));
  scanf("%d%lf", &n, &s);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    ++d[u];
    ++d[v];
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (d[i] == 1) ++sum;
  }
  printf("%.10lf\n", 2.0 * s / sum);
  return 0;
}
