#include <bits/stdc++.h>
using namespace std;
int cnt[100001];
int main() {
  int n, s;
  scanf("%d%d", &n, &s);
  for (int i = 1; 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("%.20Lf\n", (long double)s / ans * 2);
}
