#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s, a, b;
  cin >> n >> s;
  vector<vector<int>> G(n);
  for (int i = 0; i < n - 1; i++) {
    cin >> a >> b;
    G[a - 1].push_back(b - 1);
    G[b - 1].push_back(a - 1);
  }
  double l = 0;
  for (int i = 0; i < n; i++) {
    if (G[i].size() == 1) l++;
  }
  double q;
  q = s * 1.0;
  cout << setprecision(15) << (2 * q) / l;
  return 0;
}
