#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int cnt[maxn];
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    cnt[a]++;
    cnt[b]++;
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i) {
    if (cnt[i] == 1) {
      ans++;
    }
  }
  printf("%.12lf\n", s * 1.0 / ans * 2.0);
  return 0;
}
