#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
vector<int> g[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, s;
  cin >> n >> s;
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  int leaves = 0;
  for (int i = 1; i <= n; ++i) {
    if (g[i].size() == 1) leaves++;
  }
  long double ans = (long double)(2 * s) / (long double)leaves;
  cout << fixed << setprecision(8) << ans << endl;
  return 0;
}
