#include <bits/stdc++.h>
using namespace std;
constexpr int MAX_N = 100100;
int n, s;
vector<int> adj[MAX_N];
int main() {
  scanf(" %d %d", &n, &s);
  for (int i = 0; i < n - 1; ++i) {
    int u, v;
    scanf(" %d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  int leaves = 0;
  for (int i = 1; i <= n; ++i) {
    if (adj[i].size() == 1) {
      ++leaves;
    }
  }
  printf("%0.08lf\n", 2.0 * s / leaves);
  return 0;
}
