#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > G;
int main() {
  int n, k;
  cin >> n >> k;
  G.resize(n);
  for (int i = 0; i < (n - 1); ++i) {
    int x, y;
    cin >> x >> y;
    G[x - 1].push_back(y - 1);
    G[y - 1].push_back(x - 1);
  }
  long long ans = 0;
  for (int i = 0; i < n; ++i)
    if (G[i].size() == 1) ++ans;
  double p = 2.0 * k / ans;
  cout.precision(15);
  cout << p;
  return 0;
}
