#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g(200000);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  double second;
  cin >> n >> second;
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (g[i].size() == 1) cnt++;
  }
  double ans = second / cnt;
  cout << fixed << setprecision(10) << ans + ans;
  return 0;
}
