#include <bits/stdc++.h>
using namespace std;
int ind[100050];
int main() {
  int n;
  double s;
  cin >> n >> s;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    ind[a]++;
    ind[b]++;
  }
  int leave = 0;
  for (int i = 1; i < n + 1; ++i)
    if (ind[i] == 1) leave++;
  cout << fixed << setprecision(10) << s * 2 / leave;
}
