#include <bits/stdc++.h>
using namespace std;
int deg[100005], n, s, leaf;
int main() {
  scanf("%d %d", &n, &s);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    deg[a]++;
    deg[b]++;
  }
  for (int i = 1; i <= n; i++)
    if (deg[i] == 1) leaf++;
  double ans = ((double)s) / ((double)leaf);
  printf("%.10lf", 2 * ans);
}
