#include <bits/stdc++.h>
using namespace std;
const int MX = 1e5 + 3;
int deg[MX];
pair<int, int> edge[MX];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, s;
  cin >> n >> s;
  for (int i = 0; i < n - 1; i++) {
    int u, v;
    cin >> u >> v;
    deg[u - 1]++;
    deg[v - 1]++;
    edge[i] = {u - 1, v - 1};
  }
  int cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    if (deg[edge[i].first] == 1 || deg[edge[i].second] == 1) cnt++;
  }
  cout << fixed << setprecision(10) << min((double)s / cnt * 2, (double)s);
}
