#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long N = 1e6 + 14;
const long long inf = (long long)1e18 + 10;
const long long mod = 1e9 + 7;
const double eps = 1e-6;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
using namespace std;
long long n, s;
vector<long long> g[N];
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(20);
  cin >> n >> s;
  for (long long i = 0; i < n - 1; ++i) {
    long long v, u;
    cin >> v >> u;
    --v;
    --u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  long long cnt = 0;
  for (long long i = 0; i < n; ++i)
    if (g[i].size() == 1) ++cnt;
  double ans = (double)s / cnt * 2.0;
  cout << ans << "\n";
}
