#include <bits/stdc++.h>
using namespace std;
int read() {
  char x = getchar();
  int ans = 0, flag = 1;
  while (!isdigit(x))
    if (x == '-')
      flag = -1, x = getchar();
    else
      x = getchar();
  while (isdigit(x)) ans = ans * 10 + x - '0', x = getchar();
  return ans * flag;
}
int n, s, in[100005], head[100005], nxt[200005], pnt[200005];
signed main() {
  n = read(), s = read();
  for (int i = 1; i < n; i++) {
    int u = read(), v = read();
    in[u]++, in[v]++;
  }
  int tot = 0;
  for (int i = 1; i <= n; i++) {
    if (in[i] == 1) tot++;
  }
  double ans = 2.0 * s / tot;
  printf("%.10f\n", ans);
  return 0;
}
