#include <bits/stdc++.h>
using namespace std;
int n, s, t[100005], first, second, f;
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  cin >> n >> s;
  f = n;
  for (int i = 1; i < n; i++) {
    cin >> first >> second;
    t[first]++;
    t[second]++;
    if (t[first] == 2) f--;
    if (t[second] == 2) f--;
  }
  cout << fixed << setprecision(8) << 2.0 * s / f;
}
