#include <bits/stdc++.h>
using namespace std;
inline int in() {
  int x, y;
  y = scanf("%d", &x);
  return x;
}
const int N = 100 * 1000 + 5;
int deg[N];
int main() {
  int n = in(), s = in();
  for (int i = 0; i < n - 1; i++) {
    deg[in() - 1]++;
    deg[in() - 1]++;
  }
  int leaves = 0;
  for (int i = 0; i < n; i++)
    if (deg[i] == 1) leaves++;
  cout << setprecision(10) << fixed << (long double)(2 * s) / leaves << endl;
  return 0;
}
