#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 1;
vector<int> g[maxn];
int n, m;
long long x, y, s;
int main() {
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) {
    if (g[i].size() == 1) {
      s++;
    }
  }
  cout << fixed << setprecision(18) << ((double)m / (double)s) * 2;
}
