#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > AdjList;
int main() {
  int n, s, i, j;
  scanf("%d %d", &n, &s);
  AdjList.assign(n + 1, vector<int>());
  for (i = 0; i < n - 1; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    AdjList[a].push_back(b);
    AdjList[b].push_back(a);
  }
  int cnt = 0;
  for (i = 1; i <= n; i++) {
    if (AdjList[i].size() == 1) {
      cnt++;
    }
  }
  double ans = ((double)s * 2.0) / (double)cnt;
  printf("%.9lf\n", ans);
  return 0;
};
