#include <bits/stdc++.h>
using namespace std;
struct p {
  int x;
  int y;
};
bool compx(p lhs, p rhs) { return lhs.x < rhs.x; }
bool compy(p lhs, p rhs) { return lhs.y < rhs.y; }
int main() {
  double n, s;
  cin >> n >> s;
  vector<vector<int> > lst(n, vector<int>(0));
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    --a, --b;
    lst[a].push_back(b);
    lst[b].push_back(a);
  }
  int listya = 0;
  for (auto& item : lst) {
    if (item.size() == 1) {
      listya++;
    }
  }
  cout << setprecision(6) << fixed;
  cout << s / listya * 2;
  return 0;
}
