#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n, s, in[100001], a, b;
int main() {
  scanf("%d%d", &n, &s);
  int leaves = 0;
  for (int i = 1; i < n; ++i) {
    scanf("%d%d", &a, &b);
    in[a]++;
    in[b]++;
  }
  for (int i = 1; i <= n; ++i) {
    if (in[i] == 1) {
      leaves++;
    }
  }
  double need = (1.0 * s) / leaves;
  printf("%.10f\n", need * 2);
  return 0;
}
