#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n, s;
int deg[maxn];
void ReadInput() {
  cin >> n >> s;
  for (int i = 1; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    deg[x]++;
    deg[y]++;
  }
}
void Solve() {
  int nleaf = 0;
  for (int i = 1; i <= n; ++i)
    if (deg[i] == 1) nleaf++;
  cout << fixed << setprecision(12);
  cout << (double)s / (double)nleaf * 2.0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  ReadInput();
  Solve();
}
