#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
int n, S;
vector<int> G[N];
int ct[N], d[N];
int main() {
  cin >> n >> S;
  for (int i = 1, u, v; i < n; i++)
    scanf("%d%d", &u, &v), G[u].push_back(v), G[v].push_back(u);
  queue<int> q;
  for (int i = 1; i <= n; i++)
    if (G[i].size() == 1) d[i] = 1, q.push(i);
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    ++ct[d[x]];
    for (int v : G[x])
      if (!d[v]) {
        d[v] = d[x] + 1;
        q.push(v);
      }
  }
  double ans = 1e9;
  for (int i = 1, s = 0; i <= n; i++) {
    s += ct[i];
    ans = min(ans, 2.0 * i * S / s);
    break;
  }
  printf("%.8lf", ans);
  return 0;
}
