#include <bits/stdc++.h>
void Update(int a, int b, int k, int &res) {
  if (b >= k) return;
  res = std::min(res, a * k + b);
}
int main() {
  int n, s;
  while (std::cin >> n >> s) {
    std::vector<int> degree(n);
    for (int i = 1; i < n; ++i) {
      int u, v;
      std::cin >> u >> v;
      --u, --v;
      degree[u]++, degree[v]++;
    }
    int cnt = 0;
    for (int i = 0; i < n; ++i)
      if (degree[i] == 1) ++cnt;
    std::cout << std::setprecision(14) << (double)s / cnt * 2.0 << std::endl;
  }
  return 0;
}
