#include <bits/stdc++.h>
using namespace std;
int fx[4] = {1, -1, 0, 0};
int fy[4] = {0, 0, 1, -1};
const double PI = acos(-1.0);
const double EPS = 1e-6;
const int MOD = (int)1e9 + 7;
const int maxn = (int)1e5 + 5;
vector<int> g[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  float s;
  cin >> n >> s;
  for (int i = 1; i <= (n - 1); i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int cntLeaf = 0;
  for (int i = 1; i <= (n); i++) {
    if (g[i].size() == 1) cntLeaf++;
  }
  float res = 2 * (s / cntLeaf);
  cout << fixed << setprecision(14) << res << endl;
  return 0;
}
