#include <bits/stdc++.h>
using namespace std;
vector<int> v[100007];
int main() {
  int n;
  double s, cn = 0;
  scanf("%d%lf", &n, &s);
  for (int i = 1; i < n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) {
    if (v[i].size() == 1) cn++;
  }
  printf("%.10lf\n", (s / cn) * 2.0);
  return 0;
}
