#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, u, v, d[100005], num = 0;
  double s;
  memset(d, 0, sizeof d);
  cin >> n >> s;
  for (int i = 1; i < n; i++) {
    cin >> u >> v;
    d[u]++;
    d[v]++;
  }
  for (int i = 1; i <= n; i++)
    if (d[i] == 1) num++;
  cout << fixed << setprecision(7) << s / num * 2 << endl;
  return 0;
}
