#include <bits/stdc++.h>
using namespace std;
std::vector<long long> v[200000 + 9];
signed main() {
  long long i, n, k, c = 0;
  cin >> n >> k;
  for (i = 1; i < n; i++) {
    long long a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (i = 1; i <= n; i++) {
    if (v[i].size() == 1) c++;
  }
  double d = 2.0 * k / c;
  cout << fixed << setprecision(10) << d;
}
