#include <bits/stdc++.h>
using namespace std;
int n, s;
vector<int> a[100000 + 5];
int X[100000 + 5], Y[100000 + 5];
int main() {
  scanf("%d", &n), scanf("%d", &s);
  for (int i = 1; i < n; i++) {
    scanf("%d", &X[i]), scanf("%d", &Y[i]);
    a[X[i]].push_back(Y[i]);
    a[Y[i]].push_back(X[i]);
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i].size() == 1) cnt++;
  }
  double ans = (double)s * 2 / cnt;
  printf("%.18lf\n", ans);
  return 0;
}
