#include <bits/stdc++.h>
using namespace std;
vector<vector<long long>> adjlist;
void solve() {
  long long n, s;
  cin >> n >> s;
  adjlist.resize(n + 1);
  for (long long i = 1; i < n; ++i) {
    long long u, v;
    cin >> u >> v;
    adjlist[u].push_back(v);
    adjlist[v].push_back(u);
  }
  long long leaves = 0;
  for (long long i = 1; i <= n; ++i) {
    if ((long long)adjlist[i].size() == 1) ++leaves;
  }
  cout << setprecision(6) << (double(2 * s) / leaves);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long t = 1;
  cout << fixed;
  while (t--) solve();
  return 0;
}
