#include <bits/stdc++.h>
using namespace std;
vector<int> G[100100];
int main() {
  int n, s;
  cin >> n >> s;
  for (int i = 1; i <= n - 1; i++) {
    int a, b;
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  int num = 0;
  for (int i = 1; i <= n; i++)
    if (G[i].size() == 1) num++;
  double ans = (double)2 * ((double)s / num);
  printf("%.10f\n", ans);
}
