#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
vector<int> g[N];
int main() {
  int n;
  long double k, c = 0;
  cin >> n >> k;
  for (int i = 0, v, u; i < n - 1; i++) {
    cin >> v >> u;
    g[v].push_back(u);
    g[u].push_back(v);
  }
  for (int i = 1; i <= n; i++) {
    c += (g[i].size() == 1);
  }
  cout.fixed;
  cout.precision(12);
  cout << (k / c) * 2;
}
