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